Fix tests

This commit is contained in:
aruraghuwanshi 2024-10-27 22:39:33 -07:00
parent 9cc76ee044
commit 9169a1d176
1 changed files with 9 additions and 0 deletions

View File

@ -64,6 +64,7 @@ public class ThresholdBasedQueryPrioritizationStrategyTest
DateTime startDate = DateTimes.nowUtc().minusDays(1); DateTime startDate = DateTimes.nowUtc().minusDays(1);
DateTime endDate = DateTimes.nowUtc(); DateTime endDate = DateTimes.nowUtc();
TimeseriesQuery query = queryBuilder.intervals(ImmutableList.of(new Interval(startDate, endDate))) TimeseriesQuery query = queryBuilder.intervals(ImmutableList.of(new Interval(startDate, endDate)))
.dataSource("generalDatasource")
.granularity(Granularities.MINUTE) .granularity(Granularities.MINUTE)
.context(ImmutableMap.of()) .context(ImmutableMap.of())
.build(); .build();
@ -87,6 +88,7 @@ public class ThresholdBasedQueryPrioritizationStrategyTest
DateTime startDate = DateTimes.nowUtc().minusDays(100); DateTime startDate = DateTimes.nowUtc().minusDays(100);
DateTime endDate = DateTimes.nowUtc().minusDays(80); DateTime endDate = DateTimes.nowUtc().minusDays(80);
TimeseriesQuery query = queryBuilder.intervals(ImmutableList.of(new Interval(startDate, endDate))) TimeseriesQuery query = queryBuilder.intervals(ImmutableList.of(new Interval(startDate, endDate)))
.dataSource("generalDatasource")
.granularity(Granularities.HOUR) .granularity(Granularities.HOUR)
.context(ImmutableMap.of()) .context(ImmutableMap.of())
.build(); .build();
@ -111,6 +113,7 @@ public class ThresholdBasedQueryPrioritizationStrategyTest
DateTime startDate = DateTimes.nowUtc().minusDays(1); DateTime startDate = DateTimes.nowUtc().minusDays(1);
DateTime endDate = DateTimes.nowUtc(); DateTime endDate = DateTimes.nowUtc();
TimeseriesQuery query = queryBuilder.intervals(ImmutableList.of(new Interval(startDate, endDate))) TimeseriesQuery query = queryBuilder.intervals(ImmutableList.of(new Interval(startDate, endDate)))
.dataSource("generalDatasource")
.granularity(Granularities.MINUTE) .granularity(Granularities.MINUTE)
.context(ImmutableMap.of()) .context(ImmutableMap.of())
.build(); .build();
@ -134,6 +137,7 @@ public class ThresholdBasedQueryPrioritizationStrategyTest
DateTime startDate = DateTimes.nowUtc().minusDays(20); DateTime startDate = DateTimes.nowUtc().minusDays(20);
DateTime endDate = DateTimes.nowUtc(); DateTime endDate = DateTimes.nowUtc();
TimeseriesQuery query = queryBuilder.intervals(ImmutableList.of(new Interval(startDate, endDate))) TimeseriesQuery query = queryBuilder.intervals(ImmutableList.of(new Interval(startDate, endDate)))
.dataSource("generalDatasource")
.granularity(Granularities.HOUR) .granularity(Granularities.HOUR)
.context(ImmutableMap.of()) .context(ImmutableMap.of())
.build(); .build();
@ -158,6 +162,7 @@ public class ThresholdBasedQueryPrioritizationStrategyTest
DateTime startDate = DateTimes.nowUtc().minusDays(1); DateTime startDate = DateTimes.nowUtc().minusDays(1);
DateTime endDate = DateTimes.nowUtc(); DateTime endDate = DateTimes.nowUtc();
TimeseriesQuery query = queryBuilder.intervals(ImmutableList.of(new Interval(startDate, endDate))) TimeseriesQuery query = queryBuilder.intervals(ImmutableList.of(new Interval(startDate, endDate)))
.dataSource("generalDatasource")
.granularity(Granularities.MINUTE) .granularity(Granularities.MINUTE)
.context(ImmutableMap.of()) .context(ImmutableMap.of())
.build(); .build();
@ -184,6 +189,7 @@ public class ThresholdBasedQueryPrioritizationStrategyTest
DateTime startDate = DateTimes.nowUtc().minusDays(20); DateTime startDate = DateTimes.nowUtc().minusDays(20);
DateTime endDate = DateTimes.nowUtc(); DateTime endDate = DateTimes.nowUtc();
TimeseriesQuery query = queryBuilder.intervals(ImmutableList.of(new Interval(startDate, endDate))) TimeseriesQuery query = queryBuilder.intervals(ImmutableList.of(new Interval(startDate, endDate)))
.dataSource("generalDatasource")
.granularity(Granularities.HOUR) .granularity(Granularities.HOUR)
.context(ImmutableMap.of()) .context(ImmutableMap.of())
.build(); .build();
@ -215,6 +221,7 @@ public class ThresholdBasedQueryPrioritizationStrategyTest
DateTime startDate = DateTimes.nowUtc().minusDays(1); DateTime startDate = DateTimes.nowUtc().minusDays(1);
DateTime endDate = DateTimes.nowUtc(); DateTime endDate = DateTimes.nowUtc();
TimeseriesQuery query = queryBuilder.intervals(ImmutableList.of(new Interval(startDate, endDate))) TimeseriesQuery query = queryBuilder.intervals(ImmutableList.of(new Interval(startDate, endDate)))
.dataSource("generalDatasource")
.granularity(Granularities.MINUTE) .granularity(Granularities.MINUTE)
.context(ImmutableMap.of()) .context(ImmutableMap.of())
.build(); .build();
@ -240,6 +247,7 @@ public class ThresholdBasedQueryPrioritizationStrategyTest
DateTime startDate = DateTimes.nowUtc().minusDays(20); DateTime startDate = DateTimes.nowUtc().minusDays(20);
DateTime endDate = DateTimes.nowUtc(); DateTime endDate = DateTimes.nowUtc();
TimeseriesQuery query = queryBuilder.intervals(ImmutableList.of(new Interval(startDate, endDate))) TimeseriesQuery query = queryBuilder.intervals(ImmutableList.of(new Interval(startDate, endDate)))
.dataSource("generalDatasource")
.granularity(Granularities.HOUR) .granularity(Granularities.HOUR)
.context(ImmutableMap.of()) .context(ImmutableMap.of())
.build(); .build();
@ -266,6 +274,7 @@ public class ThresholdBasedQueryPrioritizationStrategyTest
DateTime startDate = DateTimes.nowUtc().minusDays(20); DateTime startDate = DateTimes.nowUtc().minusDays(20);
DateTime endDate = DateTimes.nowUtc(); DateTime endDate = DateTimes.nowUtc();
TimeseriesQuery query = queryBuilder.intervals(ImmutableList.of(new Interval(startDate, endDate))) TimeseriesQuery query = queryBuilder.intervals(ImmutableList.of(new Interval(startDate, endDate)))
.dataSource("generalDatasource")
.granularity(Granularities.HOUR) .granularity(Granularities.HOUR)
.context(ImmutableMap.of()) .context(ImmutableMap.of())
.build(); .build();