[TEST] only use internal API if we are running against an internal cluster
This commit is contained in:
parent
e95af69fb7
commit
1205c66cfb
|
@ -1479,18 +1479,18 @@ public abstract class ESIntegTestCase extends ESTestCase {
|
|||
if (rarely()) {
|
||||
if (rarely()) {
|
||||
client().admin().indices().prepareRefresh(indices).setIndicesOptions(IndicesOptions.lenientExpandOpen()).execute(
|
||||
new LatchedActionListener<RefreshResponse>(newLatch(inFlightAsyncOperations)));
|
||||
new LatchedActionListener<>(newLatch(inFlightAsyncOperations)));
|
||||
} else if (maybeFlush && rarely()) {
|
||||
if (randomBoolean()) {
|
||||
client().admin().indices().prepareFlush(indices).setIndicesOptions(IndicesOptions.lenientExpandOpen()).execute(
|
||||
new LatchedActionListener<FlushResponse>(newLatch(inFlightAsyncOperations)));
|
||||
} else {
|
||||
new LatchedActionListener<>(newLatch(inFlightAsyncOperations)));
|
||||
} else if (isInternalCluster()) {
|
||||
internalCluster().getInstance(SyncedFlushService.class).attemptSyncedFlush(indices, IndicesOptions.lenientExpandOpen(),
|
||||
new LatchedActionListener<IndicesSyncedFlushResult>(newLatch(inFlightAsyncOperations)));
|
||||
new LatchedActionListener<>(newLatch(inFlightAsyncOperations)));
|
||||
}
|
||||
} else if (rarely()) {
|
||||
client().admin().indices().prepareOptimize(indices).setIndicesOptions(IndicesOptions.lenientExpandOpen()).setMaxNumSegments(between(1, 10)).setFlush(maybeFlush && randomBoolean()).execute(
|
||||
new LatchedActionListener<OptimizeResponse>(newLatch(inFlightAsyncOperations)));
|
||||
new LatchedActionListener<>(newLatch(inFlightAsyncOperations)));
|
||||
}
|
||||
}
|
||||
while (inFlightAsyncOperations.size() > MAX_IN_FLIGHT_ASYNC_INDEXES) {
|
||||
|
|
Loading…
Reference in New Issue