Skip to content

Commit 598fbd4

Browse files
author
Adam Tackett
committed
sunday test
Signed-off-by: Adam Tackett <tackadam@amazon.com>
1 parent bcc3722 commit 598fbd4

File tree

2 files changed

+8
-7
lines changed

2 files changed

+8
-7
lines changed

.cypress/utils/apm_data_helpers.js

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -280,11 +280,12 @@ export const verifyPrometheusReady = (prometheusUrl) => {
280280
*/
281281
export const getAPMTestTimeRange = () => {
282282
// Return current time with 2-minute window
283-
// This ensures queries hit the recently scraped data
283+
// End time needs significant future buffer because instant queries execute
284+
// at the end of the range, and there's delay between setting picker and queries running
284285
return cy.wrap(null).then(() => {
285286
const now = new Date();
286-
const startTime = new Date(now.getTime() - (2 * 60 * 1000)); // 2 minutes ago
287-
const endTime = new Date(now.getTime() + (30 * 1000)); // 30 seconds in future
287+
const startTime = new Date(now.getTime() - (3 * 60 * 1000)); // 3 minutes ago
288+
const endTime = new Date(now.getTime() + (2 * 60 * 1000)); // 2 minutes in future
288289

289290
return {
290291
start: startTime,

.github/workflows/integration-tests-workflow.yml

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -266,10 +266,10 @@ jobs:
266266
sleep 2
267267
done
268268
269-
# Wait 2 minutes for Prometheus to accumulate scrapes
270-
# This allows sum_over_time[2m] queries to work
271-
echo "Waiting 2 minutes for Prometheus to accumulate metric scrapes..."
272-
sleep 120
269+
# Wait 3 minutes for Prometheus to accumulate scrapes
270+
# This ensures sum_over_time queries have enough data in the lookback window
271+
echo "Waiting 3 minutes for Prometheus to accumulate metric scrapes..."
272+
sleep 180
273273
274274
# Verify metrics are available
275275
echo "Verifying metrics are available..."

0 commit comments

Comments
 (0)