Search in sources :

Example 1 with DateTime

use of co.elastic.clients.util.DateTime in project elasticsearch-java by elastic.

the class RequestTest method testBuildTime.

@Test
public void testBuildTime() throws Exception {
    DateTime buildTime = client.info().version().buildDate();
    Instant early2020 = DateTimeFormatter.ISO_INSTANT.parse("2020-01-01T00:00:00Z", Instant::from);
    assertTrue(early2020.isBefore(buildTime.toInstant()));
}
Also used : Instant(java.time.Instant) DateTime(co.elastic.clients.util.DateTime) Test(org.junit.Test)

Aggregations

DateTime (co.elastic.clients.util.DateTime)1 Instant (java.time.Instant)1 Test (org.junit.Test)1