This repository has been archived by the owner on Jan 30, 2020. It is now read-only.
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
functional: improve TestReconfigureServer test
Remove the sleep call that allowed us to produce reliable tests, it turns out it may fail in rare cases. I suspect this due to journald delays and how things are serialized and started when running the test. Instead, start a normal unit then unload it to reproduce a real behaviour then follow up with the SIGHUP on fleetd. If the "Reloading configuration" message do not show up on the logs, then we do not fail since the signal was received and processed, instead continue with the "list-units" check, if it succeed then the test should have passed at this point. However, we continue and check the logs that we ignored previously since the test also checks for the "Failed serving HTTP on listener" which informs us that fleetd failed. So we check the logs again if we find them we proceed with that message and check it, otherwise we skip the test at this point. We do not want developers to have failing functional tests results due to obscure delays. However the test succeed now and is more reliable. I have been running it for more than 1 hour now (more than 100 times), it did not fail and it was never skipped.
- Loading branch information