@@ -64,7 +64,7 @@ protected String getJobId() {
64
64
65
65
@ Override
66
66
protected IterationResult <Integer > doProcess (SearchResponse searchResponse ) {
67
- awaitForLatch ( );
67
+ assertFalse ( "should not be called as stoppedBeforeFinished is false" , stoppedBeforeFinished );
68
68
assertThat (step , equalTo (3 ));
69
69
++step ;
70
70
return new IterationResult <>(Collections .emptyList (), 3 , true );
@@ -99,6 +99,9 @@ protected void doNextSearch(SearchRequest request, ActionListener<SearchResponse
99
99
final SearchResponseSections sections = new SearchResponseSections (
100
100
new SearchHits (new SearchHit [0 ], new TotalHits (0 , TotalHits .Relation .EQUAL_TO ), 0 ), null ,
101
101
null , false , null , null , 1 );
102
+
103
+ // block till latch has been counted down, simulating network latency
104
+ awaitForLatch ();
102
105
nextPhase .onResponse (new SearchResponse (sections , null , 1 , 1 , 0 , 0 , ShardSearchFailure .EMPTY_ARRAY , null ));
103
106
}
104
107
@@ -222,7 +225,6 @@ public XContentBuilder toXContent(XContentBuilder builder, Params params) throws
222
225
}
223
226
}
224
227
225
- @ AwaitsFix ( bugUrl = "https://github.com/elastic/elasticsearch/issues/42084" )
226
228
public void testStateMachine () throws Exception {
227
229
AtomicReference <IndexerState > state = new AtomicReference <>(IndexerState .STOPPED );
228
230
final ExecutorService executor = Executors .newFixedThreadPool (1 );
@@ -265,7 +267,6 @@ public void testStateMachineBrokenSearch() throws InterruptedException {
265
267
}
266
268
}
267
269
268
- @ AwaitsFix ( bugUrl = "https://github.com/elastic/elasticsearch/issues/42084" )
269
270
public void testStop_AfterIndexerIsFinished () throws InterruptedException {
270
271
AtomicReference <IndexerState > state = new AtomicReference <>(IndexerState .STOPPED );
271
272
final ExecutorService executor = Executors .newFixedThreadPool (1 );
@@ -285,7 +286,6 @@ public void testStop_AfterIndexerIsFinished() throws InterruptedException {
285
286
}
286
287
}
287
288
288
- @ AwaitsFix ( bugUrl = "https://github.com/elastic/elasticsearch/issues/42084" )
289
289
public void testStop_WhileIndexing () throws InterruptedException {
290
290
AtomicReference <IndexerState > state = new AtomicReference <>(IndexerState .STOPPED );
291
291
final ExecutorService executor = Executors .newFixedThreadPool (1 );
0 commit comments