Repository navigation
tests: be less flaky due to timing issues - #23
Merged
Merged
Conversation
test_dispatcher 21 to 26: dispatcher_client_server and dispatcher_two_clients started the test server in the background and ran the client straight away. The server creates the dispatcher, then does a write of its own before it serves. A client that got ahead of it either couldn't open the shared memory, or found the server's test-shadow.lock and failed its "lock doesn't exist before write_start()" check. Wait a second after starting the server, as the other suites do after starting the dispatcher. osm3s_query 22 and 68: their queries have a one second timeout and are expected to complete, so they fail when the machine is slow. Skip them, like tests 19, 28, 31, 34, 66 and 67. Co-Authored-By: Colin Dellow <cldellow@gmail.com>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Now that the tests are merged and running more often, we see some additional tests that are flaky due to timing.
This PR skips two more osm3s_query tests that have timeouts that can succeed/fail based on load: 22 and 68.
It also adjusts how the template_db suite works by
sleep 1ing after the dispatcher is started but before the client runs.Sleeps are a distasteful way to solve this. They don't guarantee the problem is avoided, and they waste time in the happy path when the dispatcher startup takes less than 1 second.
Still, I think it's probably good enough for these tests: