Skip to content

recipe/test_wrapper: wait longer for the pidfile

Thomas Gambier requested to merge fix_test_pidfile into master

The wrapper writes the pidfile after it imports slapos.recipe.librecipe.execute. On Python 2, this import takes about 1.3 seconds on an idle machine, because the librecipe package imports zc.buildout, pip and slapos.slap. On a loaded test node, it takes more than the 2 seconds that the TestPidFile tests waited, and both tests failed.

Wait up to 30 seconds for the wrapper to write its own pid. Stop waiting if the wrapper exits. Run "sleep 60" so that the wrapper does not exit during the wait. Stop the wrapper before the test reads its output, so that the read does not block.

Co-Authored-By: AI agent ai-agent@noreply

Merge request reports