@@ -91,6 +91,7 @@ public void testDeleteExpiredDataGivenNothingToDelete() throws Exception {
91
91
client ().execute (DeleteExpiredDataAction .INSTANCE , new DeleteExpiredDataAction .Request ()).get ();
92
92
}
93
93
94
+ @ AwaitsFix (bugUrl = "https://github.com/elastic/ml-cpp/pulls/468" )
94
95
public void testDeleteExpiredData () throws Exception {
95
96
// Index some unused state documents (more than 10K to test scrolling works)
96
97
BulkRequestBuilder bulkRequestBuilder = client ().prepareBulk ();
@@ -137,7 +138,7 @@ public void testDeleteExpiredData() throws Exception {
137
138
138
139
for (Job .Builder job : getJobs ()) {
139
140
assertThat (getBuckets (job .getId ()).size (), is (greaterThanOrEqualTo (47 )));
140
- assertThat (getRecords (job .getId ()).size (), equalTo (1 ));
141
+ assertThat (getRecords (job .getId ()).size (), equalTo (2 ));
141
142
List <ModelSnapshot > modelSnapshots = getModelSnapshots (job .getId ());
142
143
assertThat (modelSnapshots .size (), equalTo (1 ));
143
144
String snapshotDocId = ModelSnapshot .documentId (modelSnapshots .get (0 ));
@@ -173,7 +174,7 @@ public void testDeleteExpiredData() throws Exception {
173
174
startDatafeed (job .getId () + "-feed" , 0 , now );
174
175
waitUntilJobIsClosed (job .getId ());
175
176
assertThat (getBuckets (job .getId ()).size (), is (greaterThanOrEqualTo (70 )));
176
- assertThat (getRecords (job .getId ()).size (), equalTo (1 ));
177
+ assertThat (getRecords (job .getId ()).size (), equalTo (2 ));
177
178
List <ModelSnapshot > modelSnapshots = getModelSnapshots (job .getId ());
178
179
assertThat (modelSnapshots .size (), equalTo (2 ));
179
180
}
@@ -205,7 +206,7 @@ public void testDeleteExpiredData() throws Exception {
205
206
206
207
// no-retention job should have kept all data
207
208
assertThat (getBuckets ("no-retention" ).size (), is (greaterThanOrEqualTo (70 )));
208
- assertThat (getRecords ("no-retention" ).size (), equalTo (1 ));
209
+ assertThat (getRecords ("no-retention" ).size (), equalTo (2 ));
209
210
assertThat (getModelSnapshots ("no-retention" ).size (), equalTo (2 ));
210
211
211
212
List <Bucket > buckets = getBuckets ("results-retention" );
@@ -216,11 +217,11 @@ public void testDeleteExpiredData() throws Exception {
216
217
assertThat (getModelSnapshots ("results-retention" ).size (), equalTo (2 ));
217
218
218
219
assertThat (getBuckets ("snapshots-retention" ).size (), is (greaterThanOrEqualTo (70 )));
219
- assertThat (getRecords ("snapshots-retention" ).size (), equalTo (1 ));
220
+ assertThat (getRecords ("snapshots-retention" ).size (), equalTo (2 ));
220
221
assertThat (getModelSnapshots ("snapshots-retention" ).size (), equalTo (1 ));
221
222
222
223
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 ));
224
225
assertThat (getModelSnapshots ("snapshots-retention-with-retain" ).size (), equalTo (2 ));
225
226
226
227
buckets = getBuckets ("results-and-snapshots-retention" );
0 commit comments