[ML] fix test check as randomness allows for different hours (#40536) (#40727)

* [ML] fix test check as randomness allows for different hours

* Re-enabling test
This commit is contained in:
Benjamin Trent 2019-04-02 12:33:35 -05:00 committed by GitHub
parent 2fd01cc0b7
commit 29180cefac
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 1 additions and 2 deletions

View File

@ -268,7 +268,6 @@ public class DataFramePivotRestIT extends DataFrameRestTestCase {
});
}
@AwaitsFix(bugUrl = "https://github.com/elastic/elasticsearch/issues/40537")
public void testPivotWithMaxOnDateField() throws Exception {
String transformId = "simpleDateHistogramPivotWithMaxTime";
String dataFrameIndex = "pivot_reviews_via_date_histogram_with_max_time";
@ -312,7 +311,7 @@ public class DataFramePivotRestIT extends DataFrameRestTestCase {
Map<String, Object> searchResult = getAsMap(dataFrameIndex + "/_search?q=by_day:2017-01-15");
String actual = (String) ((List<?>) XContentMapValues.extractValue("hits.hits._source.timestamp", searchResult)).get(0);
// Do `containsString` as actual ending timestamp is indeterminate due to how data is generated
assertThat(actual, containsString("2017-01-15T20:"));
assertThat(actual, containsString("2017-01-15T"));
}
private void assertOnePivotValue(String query, double expected) throws IOException {