diff --git a/testHelpers/testapp/app/src/test/java/com/example/example/SuperTokensHttpURLConnectionTest.java b/testHelpers/testapp/app/src/test/java/com/example/example/SuperTokensHttpURLConnectionTest.java index 4a69205..11cb8ae 100644 --- a/testHelpers/testapp/app/src/test/java/com/example/example/SuperTokensHttpURLConnectionTest.java +++ b/testHelpers/testapp/app/src/test/java/com/example/example/SuperTokensHttpURLConnectionTest.java @@ -1104,7 +1104,7 @@ public void doAction(HttpURLConnection con) throws IOException { @Test public void httpUrlConnection_shouldNotRefreshLoopWhenExpiredTokenPassedInHeadersBeforeDoAction() throws Exception{ - com.example.TestUtils.startST(1, true, 144000); + com.example.TestUtils.startST(3, true, 144000); new SuperTokens.Builder(context, Constants.apiDomain).build(); //login request @@ -1132,7 +1132,7 @@ public void doAction(HttpURLConnection con) throws IOException { loginRequestConnection.disconnect(); // wait for access token expiry - Thread.sleep(2000); + Thread.sleep(4000); String expiredAccessToken = Utils.getTokenForHeaderAuth(Utils.TokenType.ACCESS, context); @@ -1163,7 +1163,7 @@ public void doAction(HttpURLConnection con) throws IOException { @Test public void httpUrlConnection_shouldNotRefreshLoopWhenExpiredTokenRetrievedInsideDoAction() throws Exception{ - com.example.TestUtils.startST(1, true, 144000); + com.example.TestUtils.startST(3, true, 144000); new SuperTokens.Builder(context, Constants.apiDomain).build(); //login request @@ -1191,7 +1191,7 @@ public void doAction(HttpURLConnection con) throws IOException { loginRequestConnection.disconnect(); // wait for access token expiry - Thread.sleep(2000); + Thread.sleep(4000); int sessionRefreshCalledCount = com.example.TestUtils.getRefreshTokenCounter(); if (sessionRefreshCalledCount != 0) { diff --git a/testHelpers/testapp/app/src/test/java/com/example/example/SuperTokensOkHttpHeaderTests.java b/testHelpers/testapp/app/src/test/java/com/example/example/SuperTokensOkHttpHeaderTests.java index ec5fecd..33b3306 100644 --- a/testHelpers/testapp/app/src/test/java/com/example/example/SuperTokensOkHttpHeaderTests.java +++ b/testHelpers/testapp/app/src/test/java/com/example/example/SuperTokensOkHttpHeaderTests.java @@ -1220,7 +1220,7 @@ public void okhttpHeaders_testShouldNotDoSessionRefreshIfMaxRetryAttemptsForSess @Test public void okHttpHeaders_shouldNotEndUpInRefreshLoopIfExpiredAccessTokenWasPassedInHeaders() throws Exception { - com.example.TestUtils.startST(1, true, 144000); + com.example.TestUtils.startST(3, true, 144000); new SuperTokens.Builder(context, Constants.apiDomain) .build(); JsonObject bodyJson = new JsonObject(); @@ -1239,7 +1239,7 @@ public void okHttpHeaders_shouldNotEndUpInRefreshLoopIfExpiredAccessTokenWasPass loginResponse.close(); // wait for the token to expire - Thread.sleep(2000); + Thread.sleep(4000); int sessionRefreshCalledCount = com.example.TestUtils.getRefreshTokenCounter(); if (sessionRefreshCalledCount != 0) { diff --git a/testHelpers/testapp/app/src/test/java/com/example/example/SuperTokensRetrofitHeaderTests.java b/testHelpers/testapp/app/src/test/java/com/example/example/SuperTokensRetrofitHeaderTests.java index 77d6dc1..97f151b 100644 --- a/testHelpers/testapp/app/src/test/java/com/example/example/SuperTokensRetrofitHeaderTests.java +++ b/testHelpers/testapp/app/src/test/java/com/example/example/SuperTokensRetrofitHeaderTests.java @@ -821,7 +821,7 @@ public void retrofitHeaders_testShouldNotDoSessionRefreshIfMaxRetryAttemptsForSe @Test public void retrofitHeaders_shouldNotEndUpInRefreshLoopIfExpiredAccessTokenWasPassedInHeaders() throws Exception { - com.example.TestUtils.startST(1, true, 144000); + com.example.TestUtils.startST(3, true, 144000); new SuperTokens.Builder(context, Constants.apiDomain) .build(); @@ -833,7 +833,7 @@ public void retrofitHeaders_shouldNotEndUpInRefreshLoopIfExpiredAccessTokenWasPa } // wait for the token to expire - Thread.sleep(2000); + Thread.sleep(4000); int sessionRefreshCalledCount = com.example.TestUtils.getRefreshTokenCounter(); if (sessionRefreshCalledCount != 0) {