Skip to content

Commit

Permalink
definitely kill server in tests
Browse files Browse the repository at this point in the history
  • Loading branch information
Ableytner committed Oct 6, 2024
1 parent 9ca4766 commit 8e27a83
Show file tree
Hide file tree
Showing 4 changed files with 4 additions and 4 deletions.
2 changes: 1 addition & 1 deletion mcserverwrapper/src/server/base_server.py
Original file line number Diff line number Diff line change
Expand Up @@ -51,7 +51,7 @@ def start(self, blocking=True):
self._wait_for_startup()

def stop(self):
"""Stop the running server gracefully, and kills it if it doesn't stop within 20 seconds"""
"""Stop the running server gracefully"""

# server hasn't yet started, so it doesn't need to be stopped
if self._child is None:
Expand Down
2 changes: 1 addition & 1 deletion mcserverwrapper/test/helpers/forge_helper.py
Original file line number Diff line number Diff line change
Expand Up @@ -85,7 +85,7 @@ def run_forge_test(jarfile, offline_mode=False):
while "Hello World" not in line:
line = wrapper.output_queue.get(timeout=10)

wrapper.stop()
wrapper.server.kill()

assert not wrapper.server_running()
# assert that the server process really stopped
Expand Down
2 changes: 1 addition & 1 deletion mcserverwrapper/test/helpers/vanilla_helper.py
Original file line number Diff line number Diff line change
Expand Up @@ -74,7 +74,7 @@ def run_vanilla_test(jarfile, offline_mode=False):
while "I spawned" not in line:
line = wrapper.output_queue.get(timeout=5)

wrapper.stop()
wrapper.server.kill()

assert not wrapper.server_running()
# assert that the server process really stopped
Expand Down
2 changes: 1 addition & 1 deletion mcserverwrapper/test/integration_tests/test_vanilla.py
Original file line number Diff line number Diff line change
Expand Up @@ -111,7 +111,7 @@ def _test_mineflayer(newest_server_jar):
while "I spawned" not in line:
line = wrapper.output_queue.get(timeout=5)

wrapper.stop()
wrapper.server.kill()

# assert that the server process really stopped
assert wrapper.server.get_child_status(0.1) is not None
Expand Down

0 comments on commit 8e27a83

Please sign in to comment.