@@ -91,6 +91,7 @@ public void testDeleteExpiredDataGivenNothingToDelete() throws Exception {
9191 client ().execute (DeleteExpiredDataAction .INSTANCE , new DeleteExpiredDataAction .Request ()).get ();
9292 }
9393
94+ @ AwaitsFix (bugUrl = "https://github.com/elastic/ml-cpp/pulls/468" )
9495 public void testDeleteExpiredData () throws Exception {
9596 // Index some unused state documents (more than 10K to test scrolling works)
9697 BulkRequestBuilder bulkRequestBuilder = client ().prepareBulk ();
@@ -137,7 +138,7 @@ public void testDeleteExpiredData() throws Exception {
137138
138139 for (Job .Builder job : getJobs ()) {
139140 assertThat (getBuckets (job .getId ()).size (), is (greaterThanOrEqualTo (47 )));
140- assertThat (getRecords (job .getId ()).size (), equalTo (1 ));
141+ assertThat (getRecords (job .getId ()).size (), equalTo (2 ));
141142 List <ModelSnapshot > modelSnapshots = getModelSnapshots (job .getId ());
142143 assertThat (modelSnapshots .size (), equalTo (1 ));
143144 String snapshotDocId = ModelSnapshot .documentId (modelSnapshots .get (0 ));
@@ -173,7 +174,7 @@ public void testDeleteExpiredData() throws Exception {
173174 startDatafeed (job .getId () + "-feed" , 0 , now );
174175 waitUntilJobIsClosed (job .getId ());
175176 assertThat (getBuckets (job .getId ()).size (), is (greaterThanOrEqualTo (70 )));
176- assertThat (getRecords (job .getId ()).size (), equalTo (1 ));
177+ assertThat (getRecords (job .getId ()).size (), equalTo (2 ));
177178 List <ModelSnapshot > modelSnapshots = getModelSnapshots (job .getId ());
178179 assertThat (modelSnapshots .size (), equalTo (2 ));
179180 }
@@ -205,7 +206,7 @@ public void testDeleteExpiredData() throws Exception {
205206
206207 // no-retention job should have kept all data
207208 assertThat (getBuckets ("no-retention" ).size (), is (greaterThanOrEqualTo (70 )));
208- assertThat (getRecords ("no-retention" ).size (), equalTo (1 ));
209+ assertThat (getRecords ("no-retention" ).size (), equalTo (2 ));
209210 assertThat (getModelSnapshots ("no-retention" ).size (), equalTo (2 ));
210211
211212 List <Bucket > buckets = getBuckets ("results-retention" );
@@ -216,11 +217,11 @@ public void testDeleteExpiredData() throws Exception {
216217 assertThat (getModelSnapshots ("results-retention" ).size (), equalTo (2 ));
217218
218219 assertThat (getBuckets ("snapshots-retention" ).size (), is (greaterThanOrEqualTo (70 )));
219- assertThat (getRecords ("snapshots-retention" ).size (), equalTo (1 ));
220+ assertThat (getRecords ("snapshots-retention" ).size (), equalTo (2 ));
220221 assertThat (getModelSnapshots ("snapshots-retention" ).size (), equalTo (1 ));
221222
222223 assertThat (getBuckets ("snapshots-retention-with-retain" ).size (), is (greaterThanOrEqualTo (70 )));
223- assertThat (getRecords ("snapshots-retention-with-retain" ).size (), equalTo (1 ));
224+ assertThat (getRecords ("snapshots-retention-with-retain" ).size (), equalTo (2 ));
224225 assertThat (getModelSnapshots ("snapshots-retention-with-retain" ).size (), equalTo (2 ));
225226
226227 buckets = getBuckets ("results-and-snapshots-retention" );
0 commit comments