public int getMaxConcurrency ( ) { LOGGER . entering ( ) ; if ( maxTestCase == - 1 ) { try { SauceLabsHttpResponse result = doSauceRequest ( "/limits" ) ; JsonObject obj = result . getEntityAsJsonObject ( ) ; maxTestCase = obj . get ( "concurrency" ) . getAsInt ( ) ; } catch ( JsonSyntaxException | IllegalStateException | IOException e ) { LOGGER . log ( Level . SEVERE , "Unable to get max concurrency." , e ) ; } } LOGGER . exiting ( maxTestCase ) ; return maxTestCase ; }
Get the maximum number of test case that can run in parallel for the primary account .