quaint-telephone-89068
03/20/2026, 6:20 PM292
______________ TestPantsDaemonIntegration.test_pantsd_pid_change _______________
293
294
self = <pants_test.pantsd.pantsd_integration_test.TestPantsDaemonIntegration testMethod=test_pantsd_pid_change>
295
296
def test_pantsd_pid_change(self):
297
with self.pantsd_successful_run_context() as ctx:
298
ctx.runner(["help"])
299
ctx.checker.assert_started()
300
301
# Let any fs events quiesce.
302
time.sleep(10)
303
304
ctx.checker.assert_running()
305
subprocess_dir = ctx.pantsd_config["GLOBAL"]["pants_subprocessdir"]
306
(pidpath,) = glob.glob(os.path.join(subprocess_dir, "*", "pantsd", "pid"))
307
with open(pidpath, "w") as f:
308
f.write("9")
309
310
ctx.checker.assert_stopped()
311
312
# Remove the pidfile so that the teardown script doesn't try to kill process 9.
313
> os.unlink(pidpath)
314
E FileNotFoundError: [Errno 2] No such file or directory: '/tmp/process-execution5CdW9i/tmpq4xsfk3c/.pids/fd34f8cb7aab/pantsd/pid'
315
316
tests/python/pants_test/pantsd/pantsd_integration_test.py:416: FileNotFoundError
317
----------------------------- Captured stdout call -----------------------------
318
319
pantsd log is /tmp/process-execution5CdW9i/tmpq4xsfk3c/.workdir.pants.d/pantsd/pantsd.log
320
>>> config:
321
{'GLOBAL': {'pantsd': True, 'level': 'info', 'pants_subprocessdir': '/tmp/process-execution5CdW9i/tmpq4xsfk3c/.pids', 'backend_packages': ['pants.backend.python', 'pants.backend.python.lint.flake8']}}
322
323
324
running: ./pants help (config={'GLOBAL': {'pantsd': True, 'level': 'info', 'pants_subprocessdir': '/tmp/process-execution5CdW9i/tmpq4xsfk3c/.pids', 'backend_packages': ['pants.backend.python', 'pants.backend.python.lint.flake8']}}) (extra_env=None)
325
326
completed in 4.291295528411865 seconds
327
PantsDaemonMonitor: pid is 8192 is_alive=True
328
PantsDaemonMonitor: pid is 8192 is_alive=True
329
PantsDaemonMonitor: pid is None is_alive=False
330
===============================================================
331
- BEGIN pants.log ---------------------------------------------
332
===============================================================
333
07:09:39.79 [INFO] handling request: `--no-pantsrc --pants-workdir=/tmp/process-execution5CdW9i/tmpq4xsfk3c/.workdir.pants.d --print-stacktrace=True --pants-config-files=[] --pants-config-files=/tmp/process-execution5CdW9i/tmpq4xsfk3c/.workdir.pants.d/pants.toml help`
334
07:09:40.34 [INFO] request completed: `--no-pantsrc --pants-workdir=/tmp/process-execution5CdW9i/tmpq4xsfk3c/.workdir.pants.d --print-stacktrace=True --pants-config-files=[] --pants-config-files=/tmp/process-execution5CdW9i/tmpq4xsfk3c/.workdir.pants.d/pants.toml help`
335
Error: 0.63 [ERROR] The scheduler was invalidated: Exception('Another instance of pantsd is running at 9')
336
Error: 0.79 [ERROR] service failure for <pants.pantsd.service.scheduler_service.SchedulerService object at 0x7f2d980b4e90>.
337
07:09:50.79 [INFO] Waiting for ongoing runs to complete before exiting...
338
07:09:50.79 [INFO] Server exiting with Ok(())
339
07:09:50.79 [INFO] Waiting for Sessions to complete before exiting...
340
07:09:50.79 [INFO] Waiting for shutdown of: ["scheduler_service_session", "store_gc_service_session"]
341
07:09:50.79 [INFO] Shutdown completed: "scheduler_service_session"
342
07:09:50.79 [INFO] Shutdown completed: "store_gc_service_session"
343
07:09:50.79 [INFO] Exiting pantsd
344
07:09:50.79 [WARN] File watcher exiting with: The watcher was shut down.
345
07:09:50.82 [WARN] File watcher exiting with: The watcher was shut down.
346
===============================================================
347
- END pants.log -----------------------------------------------
348
===============================================================
349
- generated xml file: /tmp/process-execution5CdW9i/tests.python.pants_test.pantsd.pantsd_integration_test.py.pantsd_integration.xml -
350
351
352
=========================== short test summary info ============================
353
FAILED tests/python/pants_test/pantsd/pantsd_integration_test.py::TestPantsDaemonIntegration::test_pantsd_pid_change
354
============= 1 failed, 23 passed, 3 skipped in 248.53s (0:04:08) ==============
pantsbuild/pantsquaint-telephone-89068
03/20/2026, 6:20 PM