Skip to content

Commit

Permalink
fix: csharp executor proxy test
Browse files Browse the repository at this point in the history
  • Loading branch information
elliotzh committed Apr 25, 2024
1 parent 9b4076a commit b74cf62
Showing 1 changed file with 2 additions and 10 deletions.
Original file line number Diff line number Diff line change
@@ -1,6 +1,4 @@
import json
import platform
import signal
import socket
import subprocess
from pathlib import Path
Expand Down Expand Up @@ -64,10 +62,7 @@ async def test_destroy_with_terminates_gracefully(self):
await executor_proxy.destroy()

mock_process.poll.assert_called_once()
if platform.system() != "Windows":
mock_process.terminate.assert_called_once()
else:
mock_process.send_signal.assert_called_once_with(signal.CTRL_BREAK_EVENT)
mock_process.terminate.assert_called_once()
mock_process.wait.assert_called_once_with(timeout=5)
mock_process.kill.assert_not_called()

Expand All @@ -82,10 +77,7 @@ async def test_destroy_with_force_kill(self):
await executor_proxy.destroy()

mock_process.poll.assert_called_once()
if platform.system() != "Windows":
mock_process.terminate.assert_called_once()
else:
mock_process.send_signal.assert_called_once_with(signal.CTRL_BREAK_EVENT)
mock_process.terminate.assert_called_once()
mock_process.wait.assert_called_once_with(timeout=5)
mock_process.kill.assert_called_once()

Expand Down

0 comments on commit b74cf62

Please sign in to comment.