From f23e6ae6c14da82c26f81a80f5e2a45f3d2befa4 Mon Sep 17 00:00:00 2001 From: titusfortner Date: Tue, 27 Feb 2024 13:46:47 -0800 Subject: [PATCH] try up to 5 seconds instead of up to 15 seconds between concurrency checks --- src/test/java/com/saucelabs/concurrency/TestBase.java | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/test/java/com/saucelabs/concurrency/TestBase.java b/src/test/java/com/saucelabs/concurrency/TestBase.java index c74b7f9..78cb013 100644 --- a/src/test/java/com/saucelabs/concurrency/TestBase.java +++ b/src/test/java/com/saucelabs/concurrency/TestBase.java @@ -60,13 +60,13 @@ public void setUp(TestInfo testInfo) throws IOException, InterruptedException { boolean sessionStarted = false; while (!sessionStarted) { - int randomDuration = new Random().nextInt(14000 + 1) + 1000; + int randomDuration = new Random().nextInt(4000 + 1) + 1000; Thread.sleep(randomDuration); UserConcurrency userConcurrency = accountsEndpoint.getUserConcurrency(sauceREST.getUsername()); Organization org = userConcurrency.concurrency.organization; - System.out.println("Current concurrency: " + org.current.vms); + System.out.println("Current concurrency: " + org.current.vms + " Allowed concurrency: " + org.allowed.vms); if (org.current.vms < org.allowed.vms) { startSession(testInfo);