diff --git a/e2e/cloud-plugins-suite/azure-monitor.spec.ts b/e2e/cloud-plugins-suite/azure-monitor.spec.ts index 17ca92666f0..32844502d07 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, }); }