Prometheus: Fix flakey query cache test (#67388)

hardcode date to prevent test flake
pull/67399/head
Galen Kistler 2 years ago committed by GitHub
parent 886b91eca5
commit 69f1116f59
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
  1. 4
      public/app/plugins/datasource/prometheus/language_utils.test.ts

@ -303,7 +303,7 @@ describe('getRangeSnapInterval', () => {
it('will snap range to closest 10 minute', () => {
const queryDurationMinutes = 60;
const intervalSeconds = queryDurationMinutes * 60; // 10 minutes
const now = new Date().valueOf();
const now = 1680901009826;
const nowPlusOneMinute = now + 1000 * 60;
const nowPlusTwoMinute = now + 1000 * 60 * 2;
@ -380,7 +380,7 @@ describe('getRangeSnapInterval', () => {
it('will snap range to closest 60 minute', () => {
const queryDurationMinutes = 120;
const intervalSeconds = queryDurationMinutes * 60;
const now = new Date().valueOf();
const now = 1680901009826;
const nowPlusOneMinute = now + 1000 * 60;
const nowPlusTwoMinute = now + 1000 * 60 * 2;

Loading…
Cancel
Save