File tree Expand file tree Collapse file tree 1 file changed +13
-0
lines changed
x-pack/qa/ml-native-tests/src/test/java/org/elasticsearch/xpack/ml/integration Expand file tree Collapse file tree 1 file changed +13
-0
lines changed Original file line number Diff line number Diff line change @@ -239,6 +239,9 @@ public void testOverflowToDisk() throws Exception {
239239 throw e ;
240240 }
241241
242+ // flushing the job forces an index refresh, see https://github.com/elastic/elasticsearch/issues/31173
243+ flushJob (job .getId (), false );
244+
242245 List <ForecastRequestStats > forecastStats = getForecastStats ();
243246 assertThat (forecastStats .size (), equalTo (1 ));
244247 ForecastRequestStats forecastRequestStats = forecastStats .get (0 );
@@ -261,6 +264,16 @@ public void testOverflowToDisk() throws Exception {
261264 }
262265
263266 closeJob (job .getId ());
267+
268+ forecastStats = getForecastStats ();
269+ assertThat (forecastStats .size (), equalTo (2 ));
270+ for (ForecastRequestStats stats : forecastStats ) {
271+ forecasts = getForecasts (job .getId (), stats );
272+
273+ assertThat (forecastRequestStats .getRecordCount (), equalTo (8000L ));
274+ assertThat (forecasts .size (), equalTo (8000 ));
275+ }
276+
264277 }
265278
266279 private void createDataWithLotsOfClientIps (TimeValue bucketSpan , Job .Builder job ) throws IOException {
You can’t perform that action at this time.
0 commit comments