diff --git a/src/test/java/io/supertokens/test/AuthRecipeTest.java b/src/test/java/io/supertokens/test/AuthRecipeTest.java index 42e0ce0db..69b4c70fc 100644 --- a/src/test/java/io/supertokens/test/AuthRecipeTest.java +++ b/src/test/java/io/supertokens/test/AuthRecipeTest.java @@ -33,6 +33,7 @@ import io.supertokens.storageLayer.StorageLayer; import io.supertokens.thirdparty.ThirdParty; import io.supertokens.usermetadata.UserMetadata; +import io.supertokens.version.Version; import org.junit.AfterClass; import org.junit.Before; import org.junit.Rule; @@ -488,6 +489,8 @@ public void randomPaginationTest() throws Exception { fail(); } + boolean isMySQL = Version.getVersion(process.getProcess()).getPluginName().equals("mysql"); + for (int limit : limits) { // now we paginate in asc order @@ -497,6 +500,9 @@ public void randomPaginationTest() throws Exception { if (o1.timeJoined != o2.timeJoined) { return (int) (o1.timeJoined - o2.timeJoined); } + if (isMySQL) { + return o1.id.compareTo(o2.id); + } return o2.id.compareTo(o1.id); });