Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -154,8 +154,8 @@ void testLabelsComplex()
void testSelectTimestampLogsQuery()
throws Exception
{
Instant start = Instant.now().truncatedTo(ChronoUnit.HOURS);
Instant end = start.plus(Duration.ofHours(1));
Instant start = Instant.now().truncatedTo(ChronoUnit.HOURS).minus(Duration.ofHours(4));
Instant end = start.plus(Duration.ofHours(3));
Instant firstLineTimestamp = start.plus(Duration.ofMinutes(5)).truncatedTo(ChronoUnit.SECONDS);

client.pushLogLine("line 1", firstLineTimestamp, ImmutableMap.of("test", "select_timestamp_query"));
Expand Down Expand Up @@ -213,27 +213,27 @@ void testQueryRangeInvalidArguments()
{
assertQueryFails(
"""
SELECT to_iso8601(timestamp), value FROM
TABLE(system.query_range(
'count_over_time({test="timestamp_metrics_query"}[5m])',
TIMESTAMP '2012-08-08',
TIMESTAMP '2012-08-09',
-300
))
LIMIT 1
""",
SELECT to_iso8601(timestamp), value FROM
TABLE(system.query_range(
'count_over_time({test="timestamp_metrics_query"}[5m])',
TIMESTAMP '2012-08-08',
TIMESTAMP '2012-08-09',
-300
))
LIMIT 1
""",
"step must be positive");
assertQueryFails(
"""
SELECT to_iso8601(timestamp), value FROM
TABLE(system.query_range(
'count_over_time({test="timestamp_metrics_query"}[5m])',
TIMESTAMP '2012-08-08',
TIMESTAMP '2012-08-09',
NULL
))
LIMIT 1
""",
SELECT to_iso8601(timestamp), value FROM
TABLE(system.query_range(
'count_over_time({test="timestamp_metrics_query"}[5m])',
TIMESTAMP '2012-08-08',
TIMESTAMP '2012-08-09',
NULL
))
LIMIT 1
""",
"step must be positive");
}
}
Loading