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:
parent
8e2c461de4
commit
2ae66ce61c
2 changed files with 12 additions and 4 deletions
|
@ -47,7 +47,11 @@ module UniquePort
|
||||||
@mutex = Mutex.new
|
@mutex = Mutex.new
|
||||||
|
|
||||||
def self.call
|
def self.call
|
||||||
@mutex.synchronize { @port += 1 }
|
@mutex.synchronize {
|
||||||
|
@port += 1
|
||||||
|
@port = 3307 if @port == 3306 # MySQL on Actions
|
||||||
|
@port
|
||||||
|
}
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
|
||||||
|
|
|
@ -13,9 +13,11 @@ class TestIntegrationPumactl < TestIntegration
|
||||||
def teardown
|
def teardown
|
||||||
super
|
super
|
||||||
|
|
||||||
File.unlink @state_path rescue nil
|
begin
|
||||||
File.unlink @bind_path rescue nil
|
refute File.exist?(@bind_path), "Bind path must be removed after stop"
|
||||||
File.unlink @control_path rescue nil
|
ensure
|
||||||
|
[@bind_path, @state_path, @control_path].each { |p| File.unlink(p) rescue nil }
|
||||||
|
end
|
||||||
end
|
end
|
||||||
|
|
||||||
def test_pumactl_stop
|
def test_pumactl_stop
|
||||||
|
@ -41,6 +43,7 @@ class TestIntegrationPumactl < TestIntegration
|
||||||
|
|
||||||
# Get the PIDs of the phase 0 workers.
|
# Get the PIDs of the phase 0 workers.
|
||||||
phase0_worker_pids = get_worker_pids 0
|
phase0_worker_pids = get_worker_pids 0
|
||||||
|
assert File.exist? @bind_path
|
||||||
|
|
||||||
# Phased restart
|
# Phased restart
|
||||||
cli_pumactl "-C unix://#{@control_path} -T #{TOKEN} 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, phase0_worker_pids.length, msg
|
||||||
assert_equal WORKERS, phase1_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_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
|
# Stop
|
||||||
cli_pumactl "-C unix://#{@control_path} -T #{TOKEN} stop"
|
cli_pumactl "-C unix://#{@control_path} -T #{TOKEN} stop"
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue