Skip to content

Commit fdc7ed3

Browse files
committed
fix: fixing the OneMillionUsersTest
1 parent c2ed495 commit fdc7ed3

File tree

1 file changed

+6
-1
lines changed

1 file changed

+6
-1
lines changed

src/test/java/io/supertokens/storage/postgresql/test/OneMillionUsersTest.java

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -984,6 +984,10 @@ private static long measureTime(Supplier<Void> function) {
984984

985985
@Test
986986
public void testWithOneMillionUsers() throws Exception {
987+
if (System.getenv("ONE_MILLION_USERS_TEST") == null) {
988+
return;
989+
}
990+
987991
Main main = startCronProcess(String.valueOf(NUM_THREADS));
988992

989993
int NUMBER_OF_USERS_TO_UPLOAD = 1000000; // million
@@ -1004,6 +1008,7 @@ public void testWithOneMillionUsers() throws Exception {
10041008
JsonObject request = generateUsersJson(10000, i * 10000); // API allows 10k users upload at once
10051009
JsonObject response = uploadBulkImportUsersJson(main, request);
10061010
assertEquals("OK", response.get("status").getAsString());
1011+
System.out.println("Uploaded " + (i + 1) * 10000 + " users");
10071012
}
10081013

10091014
}
@@ -1028,7 +1033,7 @@ public void testWithOneMillionUsers() throws Exception {
10281033
int failedUsersNumber = loadBulkImportUsersCountWithStatus(main,
10291034
BulkImportStorage.BULK_IMPORT_USER_STATUS.FAILED).get("count").getAsInt();
10301035
count = newUsersNumber + processingUsersNumber;
1031-
1036+
System.out.println("Remaining users to process: " + count + " (new: " + newUsersNumber + ", processing: " + processingUsersNumber + ", failed: " + failedUsersNumber + ")");
10321037
if (count == 0) {
10331038
break;
10341039
}

0 commit comments

Comments
 (0)