Repository navigation
Remove the time limits of the tests - #795
Merged
Merged
Conversation
fontanf
force-pushed
the
tests-no-time-limit
branch
from
November 3, 2026 22:55
fe17ada to
d1d661b
Compare
The parametrized local search tests are stopped by a limit on the number of moves instead of a time limit of 5 s, so that their results don't depend on the speed of the machine. The feasibility tests of the local search and the leftover modes tests stop by themselves, without time limit, with a not-anytime optimization mode for the latter.
fontanf
force-pushed
the
tests-no-time-limit
branch
from
November 4, 2026 06:56
d1d661b to
e404a72
Compare
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.
No test should depend on a time limit, except a test of the time limit itself: a time-limited test's result depends on the speed and the load of the machine. For example,
IrregularLocalSearchTestonopen_dimension_x_mixed_shapespasses or fails depending on the load (see #793).test/irregular/local_search_test.cpp:IrregularLocalSearchTestis stopped bymaximum_number_of_moves = 10000instead of a 5 s time limit. Its results are the same from one run to the next. Its longest case takes about 4 s locally (open_dimension_x_mixed_shapes). Without any limit, it would end by itself after about 30 s.python/tests/test_leftover_modes.py: the solves use theNotAnytimeSequentialoptimization mode instead of a 2 s time limit.Tests: the local search tests pass locally in 2 runs out of 2, and
test_leftover_modes.pypasses (0.3 s). The nonlinear programming and black-box optimization tests need Knitro, so they weren't run locally.