Skip to content

Commit 4390716

Browse files
[8.2] Relax lastReservedThreads assertion in async mode to prevent test flakiness (#817)
Relax `lastReservedThreads` assertion in async mode to prevent test flakiness (#816) relax lastReservedThreads test to avoid flakyness (cherry picked from commit 31ba93e) Co-authored-by: meiravgri <[email protected]>
1 parent 95a3b10 commit 4390716

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

tests/unit/test_svs_tiered.cpp

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -327,7 +327,7 @@ TYPED_TEST(SVSTieredIndexTest, TestDebugInfoThreadCount) {
327327
// Verify: numThreads unchanged, lastReservedThreads reflects actual availability
328328
backendIndexInfo = tiered_index->GetBackendIndex()->debugInfo();
329329
ASSERT_EQ(backendIndexInfo.svsInfo.numThreads, num_threads);
330-
ASSERT_EQ(backendIndexInfo.svsInfo.lastReservedThreads, num_threads - 1);
330+
ASSERT_LE(backendIndexInfo.svsInfo.lastReservedThreads, num_threads - 1);
331331

332332
// Release occupied thread and trigger another background indexing
333333
thread_wait = false;
@@ -341,7 +341,7 @@ TYPED_TEST(SVSTieredIndexTest, TestDebugInfoThreadCount) {
341341
// Verify: numThreads unchanged, lastReservedThreads reflects we used all configured threads
342342
backendIndexInfo = tiered_index->GetBackendIndex()->debugInfo();
343343
ASSERT_EQ(backendIndexInfo.svsInfo.numThreads, num_threads);
344-
ASSERT_EQ(backendIndexInfo.svsInfo.lastReservedThreads, num_threads);
344+
ASSERT_LE(backendIndexInfo.svsInfo.lastReservedThreads, num_threads);
345345
}
346346

347347
TYPED_TEST(SVSTieredIndexTest, TestDebugInfoThreadCountWriteInPlace) {

0 commit comments

Comments
 (0)