From c34aa05548715d91f02d4597c0f0a933b2a68266 Mon Sep 17 00:00:00 2001 From: Andreas Christou Date: Thu, 22 Dec 2022 16:07:49 +0000 Subject: [PATCH] grafana/e2e: Add ability to customise scenario config (#60646) * Add ability to retry e2e test scenarios * Add wait and remove retries * Revert retry logic and elaborate on 15s wait time * No need to update datasource name now --- e2e/cloud-plugins-suite/azure-monitor.spec.ts | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/e2e/cloud-plugins-suite/azure-monitor.spec.ts b/e2e/cloud-plugins-suite/azure-monitor.spec.ts index 296e6016764..cf0c6832f0a 100644 --- a/e2e/cloud-plugins-suite/azure-monitor.spec.ts +++ b/e2e/cloud-plugins-suite/azure-monitor.spec.ts @@ -43,8 +43,12 @@ function provisionAzureMonitorDatasources(datasources: AzureMonitorProvision[]) .type(datasource.secureJsonData.clientSecret, { log: false }); e2eSelectors.configEditor.loadSubscriptions.button().click().wait('@subscriptions').wait(500); e2eSelectors.configEditor.defaultSubscription.input().find('input').type('datasources{enter}'); + // Wait for 15s so that credentials are ready. 5s has been tested locally before and seemed insufficient. + e2e().wait(15000); }, expectedAlertMessage: 'Successfully connected to all Azure Monitor endpoints', + // Reduce the timeout from 30s to error faster when an invalid alert message is presented + timeout: 10000, }); }