diff --git a/src/main/java/io/supertokens/inmemorydb/queries/EmailVerificationQueries.java b/src/main/java/io/supertokens/inmemorydb/queries/EmailVerificationQueries.java index 02a870f40..b388fac9e 100644 --- a/src/main/java/io/supertokens/inmemorydb/queries/EmailVerificationQueries.java +++ b/src/main/java/io/supertokens/inmemorydb/queries/EmailVerificationQueries.java @@ -108,7 +108,7 @@ public static void updateMultipleUsersIsEmailVerified_Transaction(Start start, C boolean isEmailVerified) throws SQLException, StorageQueryException { - String QUERY = ""; + String QUERY; if (isEmailVerified) { QUERY = "INSERT INTO " + getConfig(start).getEmailVerificationTable() + "(app_id, user_id, email) VALUES(?, ?, ?)"; diff --git a/src/test/java/io/supertokens/test/CronjobTest.java b/src/test/java/io/supertokens/test/CronjobTest.java index a29cdf8fe..139688494 100644 --- a/src/test/java/io/supertokens/test/CronjobTest.java +++ b/src/test/java/io/supertokens/test/CronjobTest.java @@ -878,7 +878,7 @@ public void testThatReAddingSameCronTaskDoesNotScheduleMoreExecutors() throws Ex Thread.sleep(5000); assertTrue(CounterCronJob.getInstance(process.getProcess()).getCount() > 3 && - CounterCronJob.getInstance(process.getProcess()).getCount() < 8); + CounterCronJob.getInstance(process.getProcess()).getCount() < 10); process.kill(); assertNotNull(process.checkOrWaitForEvent(ProcessState.PROCESS_STATE.STOPPED)); @@ -964,7 +964,7 @@ public void testThatCronJobsHaveTenantsInfoAfterRestart() throws Exception { { List>> tenantsInfos = Cronjobs.getInstance(process.getProcess()) .getTenantInfos(); - assertEquals(11, tenantsInfos.size()); + assertEquals(12, tenantsInfos.size()); int count = 0; for (List> tenantsInfo : tenantsInfos) { if (tenantsInfo != null) { @@ -974,7 +974,7 @@ public void testThatCronJobsHaveTenantsInfoAfterRestart() throws Exception { count++; } } - assertEquals(10, count); + assertEquals(11, count); } process.kill(false); @@ -991,7 +991,7 @@ public void testThatCronJobsHaveTenantsInfoAfterRestart() throws Exception { { List>> tenantsInfos = Cronjobs.getInstance(process.getProcess()) .getTenantInfos(); - assertEquals(11, tenantsInfos.size()); + assertEquals(12, tenantsInfos.size()); int count = 0; for (List> tenantsInfo : tenantsInfos) { if (tenantsInfo != null) { @@ -1001,7 +1001,7 @@ public void testThatCronJobsHaveTenantsInfoAfterRestart() throws Exception { count++; } } - assertEquals(10, count); + assertEquals(11, count); } process.kill(); @@ -1048,7 +1048,7 @@ public void testThatThereAreTasksOfAllCronTaskClassesAndHaveCorrectIntervals() t intervals.put("io.supertokens.cronjobs.telemetry.Telemetry", 86400); intervals.put("io.supertokens.cronjobs.deleteExpiredAccessTokenSigningKeys.DeleteExpiredAccessTokenSigningKeys", 86400); - intervals.put("io.supertokens.cronjobs.bulkimport.ProcessBulkImportUsers", 60); + intervals.put("io.supertokens.cronjobs.bulkimport.ProcessBulkImportUsers", 300); intervals.put("io.supertokens.cronjobs.cleanupOAuthSessionsAndChallenges.CleanupOAuthSessionsAndChallenges", 86400); @@ -1070,7 +1070,7 @@ public void testThatThereAreTasksOfAllCronTaskClassesAndHaveCorrectIntervals() t 0); List allTasks = Cronjobs.getInstance(process.getProcess()).getTasks(); - assertEquals(11, allTasks.size()); + assertEquals(12, allTasks.size()); for (CronTask task : allTasks) { assertEquals(intervals.get(task.getClass().getName()).intValue(), task.getIntervalTimeSeconds()); diff --git a/src/test/java/io/supertokens/test/bulkimport/BulkImportFlowTest.java b/src/test/java/io/supertokens/test/bulkimport/BulkImportFlowTest.java index 6b4717046..47c5d98f9 100644 --- a/src/test/java/io/supertokens/test/bulkimport/BulkImportFlowTest.java +++ b/src/test/java/io/supertokens/test/bulkimport/BulkImportFlowTest.java @@ -73,7 +73,7 @@ public void beforeEach() { public void testWithALotOfUsers() throws Exception { Main main = startCronProcess("14"); - int NUMBER_OF_USERS_TO_UPLOAD = 100000; + int NUMBER_OF_USERS_TO_UPLOAD = 10000; if (StorageLayer.getBaseStorage(main).getType() != STORAGE_TYPE.SQL || StorageLayer.isInMemDb(main)) { return; @@ -115,6 +115,7 @@ public void testWithALotOfUsers() throws Exception { int failedUsersNumber = loadBulkImportUsersCountWithStatus(main, BulkImportStorage.BULK_IMPORT_USER_STATUS.FAILED).get("count").getAsInt(); count = newUsersNumber + processingUsersNumber; + System.out.println("Remaining users: " + count); if (count == 0) { break;