2424import io .supertokens .emailpassword .EmailPassword ;
2525import io .supertokens .featureflag .EE_FEATURES ;
2626import io .supertokens .featureflag .FeatureFlagTestContent ;
27- import io .supertokens .inmemorydb .Start ;
2827import io .supertokens .multitenancy .Multitenancy ;
2928import io .supertokens .pluginInterface .STORAGE_TYPE ;
3029import io .supertokens .pluginInterface .Storage ;
3130import io .supertokens .pluginInterface .authRecipe .AuthRecipeUserInfo ;
31+ import io .supertokens .pluginInterface .sqlStorage .SQLStorage ;
3232import io .supertokens .storageLayer .StorageLayer ;
3333import io .supertokens .test .TestingProcessManager ;
3434import io .supertokens .useridmapping .UserIdMapping ;
@@ -78,7 +78,7 @@ public void deletingStandaloneUserEmitsGroupDeletion() throws Exception {
7878 if (process == null ) {
7979 return ;
8080 }
81- Start storage = (Start ) StorageLayer .getStorage (process .getProcess ());
81+ SQLStorage storage = (SQLStorage ) StorageLayer .getStorage (process .getProcess ());
8282
8383 AuthRecipeUserInfo user = EmailPassword .signUp (process .getProcess (), "u@example.com" , "password" );
8484 AuthRecipe .deleteUser (process .getProcess (), user .getSupertokensUserId (), false );
@@ -106,7 +106,7 @@ public void deletingLinkedGroupWithRemoveAllEmitsSingleGroupDeletion() throws Ex
106106 if (process == null ) {
107107 return ;
108108 }
109- Start storage = (Start ) StorageLayer .getStorage (process .getProcess ());
109+ SQLStorage storage = (SQLStorage ) StorageLayer .getStorage (process .getProcess ());
110110
111111 AuthRecipeUserInfo primary = EmailPassword .signUp (process .getProcess (), "p@example.com" , "password" );
112112 AuthRecipeUserInfo member = EmailPassword .signUp (process .getProcess (), "m@example.com" , "password" );
@@ -139,7 +139,7 @@ public void deletingOneMemberEmitsUserDeletion() throws Exception {
139139 if (process == null ) {
140140 return ;
141141 }
142- Start storage = (Start ) StorageLayer .getStorage (process .getProcess ());
142+ SQLStorage storage = (SQLStorage ) StorageLayer .getStorage (process .getProcess ());
143143
144144 AuthRecipeUserInfo primary = EmailPassword .signUp (process .getProcess (), "p@example.com" , "password" );
145145 AuthRecipeUserInfo member = EmailPassword .signUp (process .getProcess (), "m@example.com" , "password" );
@@ -205,7 +205,7 @@ public void memberDeletionRecordsShrunkAfterPresence() throws Exception {
205205
206206 AuthRecipe .deleteUser (t1 .toAppIdentifier (), a1Storage , member .getSupertokensUserId (), false , null );
207207
208- List <Row > events = readEvents ((Start ) a1Storage , LifecycleEventType .USER_DELETION .getValue ());
208+ List <Row > events = readEvents ((SQLStorage ) a1Storage , LifecycleEventType .USER_DELETION .getValue ());
209209 assertEquals (1 , events .size ());
210210 LifecycleEventPayload payload = LifecycleEventPayload .fromJson (events .get (0 ).payload );
211211 assertEquals (LifecycleEventType .USER_DELETION , payload .type );
@@ -230,7 +230,7 @@ public void deletingNonexistentUserEmitsNoEvent() throws Exception {
230230 if (process == null ) {
231231 return ;
232232 }
233- Start storage = (Start ) StorageLayer .getStorage (process .getProcess ());
233+ SQLStorage storage = (SQLStorage ) StorageLayer .getStorage (process .getProcess ());
234234
235235 AuthRecipe .deleteUser (process .getProcess (), "00000000-0000-0000-0000-000000000000" , true );
236236
@@ -254,7 +254,7 @@ public void deletingMappedStandaloneUserEmitsGroupDeletionWithSuperTokensId() th
254254 if (process == null ) {
255255 return ;
256256 }
257- Start storage = (Start ) StorageLayer .getStorage (process .getProcess ());
257+ SQLStorage storage = (SQLStorage ) StorageLayer .getStorage (process .getProcess ());
258258
259259 AuthRecipeUserInfo user = EmailPassword .signUp (process .getProcess (), "u@example.com" , "password" );
260260 String externalId = "ext-standalone" ;
@@ -288,7 +288,7 @@ public void deletingMappedMemberEmitsUserDeletionWithSuperTokensRecipeId() throw
288288 if (process == null ) {
289289 return ;
290290 }
291- Start storage = (Start ) StorageLayer .getStorage (process .getProcess ());
291+ SQLStorage storage = (SQLStorage ) StorageLayer .getStorage (process .getProcess ());
292292
293293 AuthRecipeUserInfo primary = EmailPassword .signUp (process .getProcess (), "p@example.com" , "password" );
294294 AuthRecipeUserInfo member = EmailPassword .signUp (process .getProcess (), "m@example.com" , "password" );
@@ -344,7 +344,7 @@ public void associatingUserWithTenantEmitsEvent() throws Exception {
344344 boolean added = Multitenancy .addUserIdToTenant (main , t2 , t2Storage , user .getSupertokensUserId ());
345345 assertTrue (added );
346346
347- List <Row > events = readEvents ((Start ) a1Storage , LifecycleEventType .TENANT_ASSOCIATION .getValue ());
347+ List <Row > events = readEvents ((SQLStorage ) a1Storage , LifecycleEventType .TENANT_ASSOCIATION .getValue ());
348348 assertEquals (1 , events .size ());
349349 Row event = events .get (0 );
350350 assertEquals (user .getSupertokensUserId (), event .recipeUserId );
@@ -360,7 +360,7 @@ public void associatingUserWithTenantEmitsEvent() throws Exception {
360360 // Associating again is a no-op — still exactly one event.
361361 boolean addedAgain = Multitenancy .addUserIdToTenant (main , t2 , t2Storage , user .getSupertokensUserId ());
362362 assertFalse (addedAgain );
363- assertEquals (1 , readEvents ((Start ) a1Storage , LifecycleEventType .TENANT_ASSOCIATION .getValue ()).size ());
363+ assertEquals (1 , readEvents ((SQLStorage ) a1Storage , LifecycleEventType .TENANT_ASSOCIATION .getValue ()).size ());
364364
365365 stopProcess (process );
366366 }
@@ -386,7 +386,7 @@ private void stopProcess(TestingProcessManager.TestingProcess process) throws Ex
386386 assertNotNull (process .checkOrWaitForEvent (ProcessState .PROCESS_STATE .STOPPED ));
387387 }
388388
389- private List <Row > readEvents (Start storage , String eventType ) throws Exception {
389+ private List <Row > readEvents (SQLStorage storage , String eventType ) throws Exception {
390390 String query = "SELECT recipe_user_id, primary_or_recipe_user_id, event_type, payload FROM "
391391 + ACTIVITY_LOG + " WHERE event_type = ? ORDER BY created_at" ;
392392 return storage .startTransaction (con -> {
0 commit comments