Open kostasrim opened 4 days ago
https://github.com/dragonflydb/dragonfly/actions/runs/9681419582/job/26711964457?pr=3226 all good tested in various setups
new test failure https://github.com/dragonflydb/dragonfly/actions/runs/9681657533/job/26712730878?pr=3226#step:12:905
TODO create an issue
On
failed assertions
pytest would sometimes copy the logs to the failed folderbefore
the instance is actuallystopped
. To further complicate things it turns out that this was a bigger issue because we copied the failures per session but sometimes certain fixtures hadsession
scope (for exampledf_server
) which would always cause loss of logs because the instances wouldstop right after
we copied their logs to the tmp folder.The solution is hacky but it works. We add another indirection to keep track of the failed logs for each test. Each time a test fails, we announce that the test failed and the
name of the logs that failed
and we copy their path to another file which at theend of the session
copy back to the/tmp/failed
and upload the logs. This works well forsession
fixtures as well, providing the write clean up semantics.P.s. SetUp and Teardown evaluation is a little bit of a mess in python and it's clear to me why people discourage it. Unfortunately for our use case it's required.