@@ -26,6 +26,12 @@ def run(cmd, **kwargs):
26
26
if proc .returncode != 0 :
27
27
raise RuntimeError ('Process failed!' )
28
28
29
+
30
+ def stop ():
31
+ pid = Path ("server.pid" ).read_text ().strip ()
32
+ os .kill (int (pid ), signal .SIGTERM )
33
+ Path ("server.pid" ).unlink ()
34
+
29
35
class TestLaunch (unittest .TestCase ):
30
36
31
37
def test_launch_single (self ):
@@ -37,7 +43,9 @@ def test_launch_single(self):
37
43
proc .send ('q\n ' )
38
44
proc .wait ()
39
45
self .assertEqual (proc .exitstatus , 0 )
40
- run ('mongo-orchestration stop' )
46
+ # TODO: https://jira.mongodb.org/browse/PYTHON-5594
47
+ # run('mongo-orchestration stop')
48
+ stop ()
41
49
42
50
def test_launch_replica_set (self ):
43
51
if os .name != 'posix' :
@@ -48,7 +56,9 @@ def test_launch_replica_set(self):
48
56
proc .send ('q\n ' )
49
57
proc .wait ()
50
58
self .assertEqual (proc .exitstatus , 0 )
51
- run ('mongo-orchestration stop' )
59
+ # TODO: https://jira.mongodb.org/browse/PYTHON-5594
60
+ # run('mongo-orchestration stop')
61
+ stop ()
52
62
53
63
54
64
def test_launch_sharded (self ):
@@ -60,4 +70,6 @@ def test_launch_sharded(self):
60
70
proc .send ('q\n ' )
61
71
proc .wait ()
62
72
self .assertEqual (proc .exitstatus , 0 )
63
- run ('mongo-orchestration stop' )
73
+ # TODO: https://jira.mongodb.org/browse/PYTHON-5594
74
+ # run('mongo-orchestration stop')
75
+ stop ()
0 commit comments