Skip to content

Commit cc519eb

Browse files
Using an assertion on the duration will cause the test to fail if the timeout is exceeded, making the failure explicit and the test's intent clearer.
Co-authored-by: sourcery-ai[bot] <58596630+sourcery-ai[bot]@users.noreply.github.com>
1 parent 2067e70 commit cc519eb

File tree

1 file changed

+1
-4
lines changed

1 file changed

+1
-4
lines changed

test/integration/test_modernized_interface.cpp

Lines changed: 1 addition & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -368,10 +368,7 @@ class ModernizedInterfaceTest {
368368
auto end_time = std::chrono::high_resolution_clock::now();
369369

370370
auto duration = std::chrono::duration_cast<std::chrono::milliseconds>(end_time - start_time);
371-
if (duration.count() > 2000) { // 2-second timeout
372-
std::cout << " Signal-aware integration took too long: " << duration.count() << "ms" << std::endl;
373-
return false;
374-
}
371+
ASSERT_LE(duration.count(), 2000) << "Signal-aware integration took too long: " << duration.count() << "ms";
375372

376373
std::cout << " Signal-aware integration result: [" << state[0] << ", " << state[1] << "]" << std::endl;
377374

0 commit comments

Comments
 (0)