Skip to content

Commit

Permalink
try up to 5 seconds instead of up to 15 seconds between concurrency c…
Browse files Browse the repository at this point in the history
…hecks
  • Loading branch information
titusfortner committed Feb 27, 2024
1 parent 7fd7ad9 commit f23e6ae
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions src/test/java/com/saucelabs/concurrency/TestBase.java
Original file line number Diff line number Diff line change
Expand Up @@ -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);
Expand Down

0 comments on commit f23e6ae

Please sign in to comment.