@@ -18,7 +18,7 @@ class SupervisorTest < ActiveSupport::TestCase
18
18
19
19
test "start in work mode (default)" do
20
20
pid = run_supervisor_as_fork
21
- wait_for_registered_processes ( 0.3 )
21
+ wait_for_registered_processes ( 4 )
22
22
23
23
assert_registered_supervisor ( pid )
24
24
assert_registered_workers ( 2 , supervisor_pid : pid )
@@ -30,7 +30,7 @@ class SupervisorTest < ActiveSupport::TestCase
30
30
31
31
test "start in dispatch mode" do
32
32
pid = run_supervisor_as_fork ( mode : :dispatch )
33
- wait_for_registered_processes ( 0.3 )
33
+ wait_for_registered_processes ( 4 )
34
34
35
35
assert_registered_supervisor ( pid )
36
36
assert_registered_dispatcher ( supervisor_pid : pid )
@@ -44,7 +44,7 @@ class SupervisorTest < ActiveSupport::TestCase
44
44
assert_not File . exist? ( @pidfile )
45
45
46
46
pid = run_supervisor_as_fork ( mode : :all )
47
- wait_for_registered_processes ( 0.3 )
47
+ wait_for_registered_processes ( 4 )
48
48
49
49
assert File . exist? ( @pidfile )
50
50
assert_equal pid , File . read ( @pidfile ) . strip . to_i
@@ -59,7 +59,7 @@ class SupervisorTest < ActiveSupport::TestCase
59
59
File . write ( @pidfile , ::Process . pid . to_s )
60
60
61
61
pid = run_supervisor_as_fork ( mode : :all )
62
- wait_for_registered_processes ( 0.3 )
62
+ wait_for_registered_processes ( 4 )
63
63
64
64
assert File . exist? ( @pidfile )
65
65
assert_not_equal pid , File . read ( @pidfile ) . strip . to_i
@@ -69,15 +69,17 @@ class SupervisorTest < ActiveSupport::TestCase
69
69
70
70
test "deletes previous pidfile if the owner is dead" do
71
71
pid = run_supervisor_as_fork ( mode : :all )
72
- wait_for_registered_processes ( 0.3 )
72
+ wait_for_registered_processes ( 4 )
73
73
74
74
terminate_process ( pid , signal : :KILL )
75
75
76
76
assert File . exist? ( @pidfile )
77
77
assert_equal pid , File . read ( @pidfile ) . strip . to_i
78
78
79
+ wait_for_registered_processes ( 0 )
80
+
79
81
pid = run_supervisor_as_fork ( mode : :all )
80
- wait_for_registered_processes ( 0.3 )
82
+ wait_for_registered_processes ( 4 )
81
83
82
84
assert File . exist? ( @pidfile )
83
85
assert_equal pid , File . read ( @pidfile ) . strip . to_i
0 commit comments