Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 0 additions & 3 deletions muted-tests.yml
Original file line number Diff line number Diff line change
Expand Up @@ -41,9 +41,6 @@ tests:
- class: "org.elasticsearch.xpack.inference.InferenceCrudIT"
issue: "https://github.com/elastic/elasticsearch/issues/109391"
method: "testDeleteEndpointWhileReferencedByPipeline"
- class: "org.elasticsearch.xpack.rollup.job.RollupIndexerStateTests"
issue: "https://github.com/elastic/elasticsearch/issues/109627"
method: "testMultipleJobTriggering"
- class: "org.elasticsearch.xpack.test.rest.XPackRestIT"
issue: "https://github.com/elastic/elasticsearch/issues/109687"
method: "test {p0=sql/translate/Translate SQL}"
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -549,18 +549,14 @@ public void testMultipleJobTriggering() throws Exception {
AtomicReference<IndexerState> state = new AtomicReference<>(IndexerState.STOPPED);
final ThreadPool threadPool = new TestThreadPool(getTestName());
try {
final AtomicBoolean isAborted = new AtomicBoolean(false);
DelayedEmptyRollupIndexer indexer = new DelayedEmptyRollupIndexer(threadPool, job, state, null) {
@Override
protected void onAbort() {
isAborted.set(true);
}
};
DelayedEmptyRollupIndexer indexer = new DelayedEmptyRollupIndexer(threadPool, job, state, null);
indexer.start();
for (int i = 0; i < 5; i++) {
final CountDownLatch latch = indexer.newLatch();
assertThat(indexer.getState(), equalTo(IndexerState.STARTED));
assertTrue(indexer.maybeTriggerAsyncJob(System.currentTimeMillis()));
// This may take more than one attempt due to a cleanup/transition phase
// that happens after state change to STARTED (`isJobFinishing`).
assertBusy(() -> indexer.maybeTriggerAsyncJob(System.currentTimeMillis()));
assertThat(indexer.getState(), equalTo(IndexerState.INDEXING));
assertFalse(indexer.maybeTriggerAsyncJob(System.currentTimeMillis()));
assertThat(indexer.getState(), equalTo(IndexerState.INDEXING));
Expand All @@ -570,7 +566,7 @@ protected void onAbort() {
assertThat(indexer.getStats().getNumPages(), equalTo((long) i + 1));
}
final CountDownLatch latch = indexer.newLatch();
assertTrue(indexer.maybeTriggerAsyncJob(System.currentTimeMillis()));
assertBusy(() -> indexer.maybeTriggerAsyncJob(System.currentTimeMillis()));
assertThat(indexer.stop(), equalTo(IndexerState.STOPPING));
assertThat(indexer.getState(), Matchers.either(Matchers.is(IndexerState.STOPPING)).or(Matchers.is(IndexerState.STOPPED)));
latch.countDown();
Expand Down