high-psychiatrist-4761
07/24/2025, 7:57 AMstart_server
is a pex_binary
target
pants run path/to/server:start_server -- arg1
I wrote some local integration test for this service. Before the test cases start, I start this http server by using following code. But the server does not start at all. And there is no log output from server, even I try to log at the first line of my main function of my server. Do you have any suggestion to debug this case? I just want to see some logs or stack trace at the http server side.
@classmethod
def setUpClass(cls):
cls.server_process = subprocess.Popen([
"pants", "run", "path/to/server:start_server", "--", "arg1"
])
time.sleep(2) # Give server time to start
high-psychiatrist-4761
07/24/2025, 3:52 PMcurved-manchester-66006
07/25/2025, 5:29 PMpath/to/server:start_server
is python, you might be able to 'just' import and run that as normal code, or at least using common pytest plugins/idioms. (We for example use the pytest docker compose plugin for some web server integration tests)high-psychiatrist-4761
07/28/2025, 3:42 PM