Skip to content
This repository has been archived by the owner on Aug 2, 2022. It is now read-only.

Commit

Permalink
Fixed unit test failure that was identified on a Jenkins: date format…
Browse files Browse the repository at this point in the history
… needs to be in UTC for proper comparison (#130)
  • Loading branch information
galkk authored Jul 23, 2019
1 parent 5a3ad78 commit 7d8d9c4
Showing 1 changed file with 2 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -133,11 +133,11 @@ public void sortByDateFormat() throws IOException {
JSONArray hits =
getHits(executeQuery("SELECT all_client, insert_time " +
" FROM " + TestsConstants.TEST_INDEX_ONLINE +
" ORDER BY date_format(insert_time, 'dd-MM-YYYY') DESC, insert_time " +
" ORDER BY date_format(insert_time, 'dd-MM-YYYY', 'UTC') DESC, insert_time " +
" LIMIT 10"));

assertThat(new DateTime(getSource(hits.getJSONObject(0)).get("insert_time"), DateTimeZone.UTC),
is(new DateTime("2014-08-24T07:00:55.481Z", DateTimeZone.UTC)));
is(new DateTime("2014-08-24T00:00:41.221Z", DateTimeZone.UTC)));
}

@Test
Expand Down

0 comments on commit 7d8d9c4

Please sign in to comment.