File tree 1 file changed +5
-1
lines changed
x-pack/qa/ml-native-tests/src/test/java/org/elasticsearch/xpack/ml/integration
1 file changed +5
-1
lines changed Original file line number Diff line number Diff line change @@ -129,7 +129,11 @@ public void testByFieldWithTerms() throws Exception {
129
129
startDatafeed (datafeedId , 0 , System .currentTimeMillis ());
130
130
waitUntilJobIsClosed (job .getId ());
131
131
132
- assertThat (getBuckets (job .getId ()).size (), equalTo (23 ));
132
+ // As the initial time is random, there's a chance the first record is
133
+ // aligned on a bucket start. Thus we check the buckets are in [23, 24]
134
+ assertThat (getBuckets (job .getId ()).size (), greaterThanOrEqualTo (23 ));
135
+ assertThat (getBuckets (job .getId ()).size (), lessThanOrEqualTo (24 ));
136
+
133
137
Set <String > modelPlotTerms = modelPlotTerms (job .getId (), "by_field_value" );
134
138
assertThat (modelPlotTerms , containsInAnyOrder ("user_2" , "user_3" ));
135
139
}
You can’t perform that action at this time.
0 commit comments