Skip to content

Conversation

@meisterT
Copy link
Member

Previous example failure:

not ok 2 baseurl set in environment
 # (from function `fail' in file assert.bash, line 13,
 #  from function `assert_regex' in file assert.bash, line 44,
 #  in test file submit_standalone.bats, line 21)
 #   `assert_regex "$SUBMITBASEHOST.*/api(/.*)?/contests.*\[Errno -2\] Name or service not known"' failed
 # Expected: 'domjudge.example.org.*/api(/.*)?/contests.*\[Errno -2\] Name or service not known'
 # Output:
 # Using 'https://domjudge.example.org/somejudge' as defined in the 'SUBMITBASEURL' environment variable. Pass '-u <url>' to override.
 # HTTPSConnectionPool(host='domjudge.example.org', port=443): Max retries exceeded with url: /somejudge/api/contests (Caused by NameResolutionError("<urllib3.connection.HTTPSConnection object at 0x7f9dd4abf680>: Failed to resolve 'domjudge.example.org' ([Errno -5] No address associated with hostname)"))
 # Could not obtain active contests.
 # ERROR: No (valid) contest specified, pass it as --contest or set as SUBMITCONTEST environment variable.
 # WARNING: No active contests found (and no contest specified)!
 # Type './submit --help' to get help.

Not sure why this started being brittle now, but seems to have still worked in 26c780a, but it is following the same pattern

Previous example failure:
```
not ok 2 baseurl set in environment
 # (from function `fail' in file assert.bash, line 13,
 #  from function `assert_regex' in file assert.bash, line 44,
 #  in test file submit_standalone.bats, line 21)
 #   `assert_regex "$SUBMITBASEHOST.*/api(/.*)?/contests.*\[Errno -2\] Name or service not known"' failed
 # Expected: 'domjudge.example.org.*/api(/.*)?/contests.*\[Errno -2\] Name or service not known'
 # Output:
 # Using 'https://domjudge.example.org/somejudge' as defined in the 'SUBMITBASEURL' environment variable. Pass '-u <url>' to override.
 # HTTPSConnectionPool(host='domjudge.example.org', port=443): Max retries exceeded with url: /somejudge/api/contests (Caused by NameResolutionError("<urllib3.connection.HTTPSConnection object at 0x7f9dd4abf680>: Failed to resolve 'domjudge.example.org' ([Errno -5] No address associated with hostname)"))
 # Could not obtain active contests.
 # ERROR: No (valid) contest specified, pass it as --contest or set as SUBMITCONTEST environment variable.
 # WARNING: No active contests found (and no contest specified)!
 # Type './submit --help' to get help.
```

Not sure why this started being brittle now, but seems to have still
worked in 26c780a, but it is following
the same pattern
@meisterT meisterT added this pull request to the merge queue Dec 14, 2025
Merged via the queue into DOMjudge:main with commit 7c1e087 Dec 14, 2025
36 of 40 checks passed
@meisterT meisterT deleted the submit_test branch December 14, 2025 12:36
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants