Skip to content

Commit 32087cd

Browse files
committed
Fix Flaky SearchServiceTests.testConcurrentSegmentSearchWithRandomizedModeSettings
Signed-off-by: kkewwei <kewei.11@bytedance.com> Signed-off-by: kkewwei <kkewwei@163.com>
1 parent ca3b005 commit 32087cd

File tree

1 file changed

+4
-3
lines changed

1 file changed

+4
-3
lines changed

server/src/test/java/org/opensearch/search/SearchServiceTests.java

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1498,11 +1498,12 @@ public void testConcurrentSegmentSearchWithRandomizedModeSettings() throws IOExc
14981498
String clusterMode = randomFrom(modeSettings);
14991499
String indexMode = randomFrom(modeSettings);
15001500

1501-
// default to false in case mode setting is not set
1502-
boolean concurrentSearchEnabled = false;
1503-
15041501
boolean aggregationSupportsConcurrent = randomBoolean();
15051502

1503+
// Default to auto in case mode setting is not set, we use true to represent,
1504+
// It is also decided by aggregationSupportsConcurrent.
1505+
boolean concurrentSearchEnabled = true && aggregationSupportsConcurrent;
1506+
15061507
if (indexMode != null) {
15071508
concurrentSearchEnabled = !indexMode.equals("none") && aggregationSupportsConcurrent;
15081509
} else if (clusterMode != null) {

0 commit comments

Comments
 (0)