Repository navigation
tests: let name resolution fail immediately in test_gui_start_with_bad_server - #124
Merged
Merged
Conversation
…d_server On the Windows runners, each lookup of the non-existent host WRONG-dcor-dev.mpl.mpg.de took about 37 s. DCOR-Aid resolves it 31 times during startup and shutdown, so the test took 20 minutes there (45 s on Linux), which looked like a hanging test suite. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Codecov Report✅ All modified and coverable lines are covered by tests. Additional details and impacted files@@ Coverage Diff @@
## main #124 +/- ##
==========================================
+ Coverage 72.70% 72.77% +0.06%
==========================================
Files 72 72
Lines 6057 6057
==========================================
+ Hits 4404 4408 +4
+ Misses 1653 1649 -4 ☔ View full report in Codecov by Harness. 🚀 New features to boost your workflow:
|
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.
The Windows test job looked like it was hanging in
tests/test_gui.py. With--durations=20(#123), the last main run (job 126803257463) shows the cause:The same test takes 45 s on Linux. During startup and shutdown DCOR-Aid resolves the non-existent host
WRONG-dcor-dev.mpl.mpg.de31 times (eachrequestscall: 1 try + 3 connect retries). The 45 s on Linux are the retry back-off; on Windows each failed lookup adds about 37 s.Change
tests/common.py: new context managerfail_name_resolution(host_part)that letssocket.getaddrinforaisesocket.gaierrorimmediately for matching hoststests/test_gui.py: use it intest_gui_start_with_bad_server; the test still checks that DCOR-Aid starts offlinetest_cli_fail_wrong_server_httperror(90 s) is left as it is: it takes 90 s on Linux too (retry back-off), and its host*.does.not.exist.example.comdoes not resolve slowly on Windows.Testing
test_gui_start_with_bad_serverpasses locally on Linux (45 s, as before). The Windows timing can only be verified by CI on main.🤖 Generated with Claude Code