Skip to content

Commit

Permalink
test
Browse files Browse the repository at this point in the history
  • Loading branch information
kkewwei committed Nov 29, 2024
1 parent ad0b8ed commit 8a2e7cd
Show file tree
Hide file tree
Showing 4 changed files with 4 additions and 6 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -72,9 +72,7 @@ public void testTimeoutDuringQueryPhase() throws Exception {
.setQuery(scriptQuery(new Script(ScriptType.INLINE, "mockscript", ScriptedBlockPlugin.SCRIPT_NAME, Collections.emptyMap())))
.execute();
awaitForBlock(plugins);
logger.info("begin to sleep for " + coordinatorTimeout.getMillis() + " ms");
Thread.sleep(coordinatorTimeout.getMillis() + 100);
logger.info("wake up");
disableBlocks(plugins);
SearchResponse searchResponse = searchResponseFuture.get();
assertEquals(1, searchResponse.getSuccessfulShards());
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -190,7 +190,7 @@ public void testRandomExceptions() throws IOException, InterruptedException, Exe
}

} catch (SearchPhaseExecutionException ex) {
logger.info("expected SearchPhaseException: [{}]", ex.getMessage());
logger.info("expected SearchPhaseException: [{}]", ex);
}
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -279,7 +279,7 @@ public SearchRequest(StreamInput in) throws IOException {
if (in.getVersion().onOrAfter(Version.V_2_12_0)) {
phaseTook = in.readOptionalBoolean();
}
if (in.getVersion().onOrAfter(Version.V_2_19_0)) {
if (in.getVersion().onOrAfter(Version.V_3_0_0)) {// TODO: Change if/when we backport to 2.x
coordinatorTimeout = in.readOptionalTimeValue();
}
}
Expand Down Expand Up @@ -316,7 +316,7 @@ public void writeTo(StreamOutput out) throws IOException {
if (out.getVersion().onOrAfter(Version.V_2_12_0)) {
out.writeOptionalBoolean(phaseTook);
}
if (out.getVersion().onOrAfter(Version.V_2_19_0)) {
if (out.getVersion().onOrAfter(Version.V_3_0_0)) {// TODO: Change if/when we backport to 2.x
out.writeOptionalTimeValue(coordinatorTimeout);
}
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -64,7 +64,7 @@ public class MockBigArrays extends BigArrays {
* Tracking allocations is useful when debugging a leak but shouldn't be enabled by default as this would also be very costly
* since it creates a new Exception every time a new array is created.
*/
private static final boolean TRACK_ALLOCATIONS = false;
private static final boolean TRACK_ALLOCATIONS = true;

private static final ConcurrentMap<Object, Object> ACQUIRED_ARRAYS = new ConcurrentHashMap<>();

Expand Down

0 comments on commit 8a2e7cd

Please sign in to comment.