@@ -26,6 +26,12 @@ def run(cmd, **kwargs):
2626 if proc .returncode != 0 :
2727 raise RuntimeError ('Process failed!' )
2828
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+
2935class TestLaunch (unittest .TestCase ):
3036
3137 def test_launch_single (self ):
@@ -37,7 +43,9 @@ def test_launch_single(self):
3743 proc .send ('q\n ' )
3844 proc .wait ()
3945 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 ()
4149
4250 def test_launch_replica_set (self ):
4351 if os .name != 'posix' :
@@ -48,7 +56,9 @@ def test_launch_replica_set(self):
4856 proc .send ('q\n ' )
4957 proc .wait ()
5058 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 ()
5262
5363
5464 def test_launch_sharded (self ):
@@ -60,4 +70,6 @@ def test_launch_sharded(self):
6070 proc .send ('q\n ' )
6171 proc .wait ()
6272 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