1
0
Fork 0
mirror of https://github.com/puma/puma.git synced 2022-11-09 13:48:40 -05:00

Add ignored assertion (#1960)

* Add ignored assertion

* Add Greg's skip-port-3307 patch
This commit is contained in:
Nate Berkopec 2019-09-11 15:14:11 +00:00 committed by GitHub
parent 8e2c461de4
commit 2ae66ce61c
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
2 changed files with 12 additions and 4 deletions

View file

@ -47,7 +47,11 @@ module UniquePort
@mutex = Mutex.new
def self.call
@mutex.synchronize { @port += 1 }
@mutex.synchronize {
@port += 1
@port = 3307 if @port == 3306 # MySQL on Actions
@port
}
end
end

View file

@ -13,9 +13,11 @@ class TestIntegrationPumactl < TestIntegration
def teardown
super
File.unlink @state_path rescue nil
File.unlink @bind_path rescue nil
File.unlink @control_path rescue nil
begin
refute File.exist?(@bind_path), "Bind path must be removed after stop"
ensure
[@bind_path, @state_path, @control_path].each { |p| File.unlink(p) rescue nil }
end
end
def test_pumactl_stop
@ -41,6 +43,7 @@ class TestIntegrationPumactl < TestIntegration
# Get the PIDs of the phase 0 workers.
phase0_worker_pids = get_worker_pids 0
assert File.exist? @bind_path
# Phased restart
cli_pumactl "-C unix://#{@control_path} -T #{TOKEN} phased-restart"
@ -53,6 +56,7 @@ class TestIntegrationPumactl < TestIntegration
assert_equal WORKERS, phase0_worker_pids.length, msg
assert_equal WORKERS, phase1_worker_pids.length, msg
assert_empty phase0_worker_pids & phase1_worker_pids, "#{msg}\nBoth workers should be replaced with new"
assert File.exist?(@bind_path), "Bind path must exist after phased restart"
# Stop
cli_pumactl "-C unix://#{@control_path} -T #{TOKEN} stop"