コード例 #1
0
  @Test
  @UsingDataSet(loadStrategy = LoadStrategyEnum.CLEAN_INSERT)
  public void testTimestampStatsOfIndex() throws Exception {
    TimestampStats stats = indexRangeService.timestampStatsOfIndex("graylog");

    assertThat(stats.min()).isEqualTo(new DateTime(2015, 1, 1, 1, 0, DateTimeZone.UTC));
    assertThat(stats.max()).isEqualTo(new DateTime(2015, 1, 1, 5, 0, DateTimeZone.UTC));
  }
コード例 #2
0
  @Test
  @UsingDataSet(
      locations = "EsIndexRangeServiceTest-EmptyIndex.json",
      loadStrategy = LoadStrategyEnum.CLEAN_INSERT)
  public void testTimestampStatsOfIndexWithEmptyIndex() throws Exception {
    TimestampStats stats = indexRangeService.timestampStatsOfIndex("graylog");

    assertThat(stats.min()).isEqualTo(new DateTime(0L, DateTimeZone.UTC));
    assertThat(stats.max()).isEqualTo(new DateTime(0L, DateTimeZone.UTC));
  }