From 53e74eb384566db610b1e9ab5edd47172ae9a83f Mon Sep 17 00:00:00 2001 From: Yaroslav Afenkin Date: Fri, 15 Sep 2023 12:05:01 +0300 Subject: [PATCH] Set sensible `waitForBackgroundJavaScript` timeouts --- .../plugins/credentials/CredentialsSelectHelperTest.java | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/test/java/com/cloudbees/plugins/credentials/CredentialsSelectHelperTest.java b/src/test/java/com/cloudbees/plugins/credentials/CredentialsSelectHelperTest.java index f00f6a380..b2e5515dd 100644 --- a/src/test/java/com/cloudbees/plugins/credentials/CredentialsSelectHelperTest.java +++ b/src/test/java/com/cloudbees/plugins/credentials/CredentialsSelectHelperTest.java @@ -30,7 +30,7 @@ public void doAddCredentialsFromPopupWorksAsExpected() throws Exception { addCredentialsButton.click(); HtmlListItem li = htmlPage.querySelector(".credentials-add-menu-items li"); li.click(); - wc.waitForBackgroundJavaScript(2000); + wc.waitForBackgroundJavaScript(4000); HtmlForm form = htmlPage.querySelector("#credentialsDialog form"); HtmlInput username = form.querySelector("input[name='_.username']"); @@ -42,7 +42,7 @@ public void doAddCredentialsFromPopupWorksAsExpected() throws Exception { HtmlSpan formSubmitButton = form.querySelector("#credentials-add-submit"); formSubmitButton.fireEvent("click"); - wc.waitForBackgroundJavaScript(1000); + wc.waitForBackgroundJavaScript(5000); // check if credentials were added List creds = CredentialsProvider.lookupCredentials(UsernamePasswordCredentials.class);