Skip to content

Commit 1cb3b92

Browse files
SattvikSattvik
Sattvik
authored and
Sattvik
committed
fix: tests
1 parent f9a87ed commit 1cb3b92

File tree

5 files changed

+12
-5
lines changed

5 files changed

+12
-5
lines changed

src/test/java/io/supertokens/test/accountlinking/api/UserPaginationTest.java

+7
Original file line numberDiff line numberDiff line change
@@ -149,12 +149,19 @@ public void testUserPaginationResultJson() throws Exception {
149149
}
150150

151151
AuthRecipeUserInfo user1 = createEmailPasswordUser(process.getProcess(), "[email protected]", "password");
152+
Thread.sleep(20);
152153
AuthRecipeUserInfo user2 = createEmailPasswordUser(process.getProcess(), "[email protected]", "password");
154+
Thread.sleep(20);
153155
AuthRecipeUserInfo user3 = createPasswordlessUserWithEmail(process.getProcess(), "[email protected]");
156+
Thread.sleep(20);
154157
AuthRecipeUserInfo user4 = createPasswordlessUserWithEmail(process.getProcess(), "[email protected]");
158+
Thread.sleep(20);
155159
AuthRecipeUserInfo user5 = createPasswordlessUserWithPhone(process.getProcess(), "+1234567890");
160+
Thread.sleep(20);
156161
AuthRecipeUserInfo user6 = createPasswordlessUserWithPhone(process.getProcess(), "+1234567891");
162+
Thread.sleep(20);
157163
AuthRecipeUserInfo user7 = createThirdPartyUser(process.getProcess(), "google", "test7", "[email protected]");
164+
Thread.sleep(20);
158165
AuthRecipeUserInfo user8 = createThirdPartyUser(process.getProcess(), "google", "test8", "[email protected]");
159166

160167
{

src/test/java/io/supertokens/test/bulkimport/ProcessBulkImportUsersCronJobTest.java

+1-1
Original file line numberDiff line numberDiff line change
@@ -226,7 +226,7 @@ public void shouldProcessBulkImportUsersInLargeNumbersInTheSameTenant() throws E
226226
List<BulkImportUser> users = generateBulkImportUser(usersCount);
227227
BulkImport.addUsers(appIdentifier, storage, users);
228228

229-
waitForProcessingWithTimeout(appIdentifier, storage, 300); // 5 minutes
229+
waitForProcessingWithTimeout(appIdentifier, storage, 600); // 10 minutes
230230

231231
List<BulkImportUser> usersAfterProcessing = storage.getBulkImportUsers(appIdentifier, 1000, null,
232232
null, null);

src/test/java/io/supertokens/test/mfa/api/CreatePrimaryUserAPITest.java

+1-1
Original file line numberDiff line numberDiff line change
@@ -516,7 +516,7 @@ public void createPrimaryUserInTenantWithAnotherStorage() throws Exception {
516516
@Test
517517
public void createReturnsFailsWithoutFeatureEnabled() throws Exception {
518518
String[] args = {"../"};
519-
TestingProcessManager.TestingProcess process = TestingProcessManager.start(args);
519+
TestingProcessManager.TestingProcess process = TestingProcessManager.startIsolatedProcess(args);
520520
assertNotNull(process.checkOrWaitForEvent(ProcessState.PROCESS_STATE.STARTED));
521521

522522
if (StorageLayer.getStorage(process.getProcess()).getType() != STORAGE_TYPE.SQL) {

src/test/java/io/supertokens/test/multitenant/StorageLayerTest.java

+2-2
Original file line numberDiff line numberDiff line change
@@ -88,7 +88,7 @@ public void normalConfigContinuesToWork() throws InterruptedException, IOExcepti
8888
public void testDefaultTenant() throws InterruptedException, StorageQueryException {
8989
String[] args = {"../"};
9090

91-
TestingProcessManager.TestingProcess process = TestingProcessManager.start(args);
91+
TestingProcessManager.TestingProcess process = TestingProcessManager.startIsolatedProcess(args);
9292
FeatureFlagTestContent.getInstance(process.getProcess())
9393
.setKeyValue(FeatureFlagTestContent.ENABLED_FEATURES, new EE_FEATURES[]{EE_FEATURES.MULTI_TENANCY});
9494
assertNotNull(process.checkOrWaitForEvent(ProcessState.PROCESS_STATE.STARTED));
@@ -102,7 +102,7 @@ public void testDefaultTenant() throws InterruptedException, StorageQueryExcepti
102102

103103
TenantConfig[] tenantConfigs = mtStorage.getAllTenants();
104104

105-
assertEquals(1 + 1, tenantConfigs.length); // + 1 app created for test
105+
assertEquals(1, tenantConfigs.length);
106106
TenantConfig baseTenantConfig = tenantConfigs[0];
107107

108108
assertEquals(new TenantIdentifier(null, null, null), baseTenantConfig.tenantIdentifier);

src/test/java/io/supertokens/test/session/AccessTokenSigningKeyTest.java

+1-1
Original file line numberDiff line numberDiff line change
@@ -69,7 +69,7 @@ public void legacySigningKeysAreMigratedProperly() throws InterruptedException,
6969
StorageQueryException, StorageTransactionLogicException, TenantOrAppNotFoundException,
7070
UnsupportedJWTSigningAlgorithmException {
7171
String[] args = {"../"};
72-
TestingProcess process = TestingProcessManager.start(args);
72+
TestingProcess process = TestingProcessManager.startIsolatedProcess(args);
7373

7474
EventAndException e = process.checkOrWaitForEvent(PROCESS_STATE.STARTED);
7575
assertNotNull(e);

0 commit comments

Comments
 (0)