Skip to content

Commit 2371c6d

Browse files
committed
fix: fixing tests
1 parent cd1acd5 commit 2371c6d

File tree

1 file changed

+4
-4
lines changed

1 file changed

+4
-4
lines changed

src/test/java/io/supertokens/storage/postgresql/test/multitenancy/TestForNoCrashDuringStartup.java

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -48,8 +48,8 @@
4848

4949
import java.io.IOException;
5050

51-
import static org.junit.Assert.*;
5251
import static io.supertokens.storage.postgresql.QueryExecutorTemplate.update;
52+
import static org.junit.Assert.*;
5353

5454
public class TestForNoCrashDuringStartup {
5555
TestingProcessManager.TestingProcess process;
@@ -112,7 +112,7 @@ public void testThatCUDRecoversWhenItFailsToAddEntryDuringCreation() throws Exce
112112
fail();
113113
} catch (HttpResponseException e) {
114114
// ignore
115-
assertEquals("Http error. Status Code: 500. Message: java.sql.SQLException: Simulated error in addTenantIdInTargetStorage", e.getMessage());
115+
assertEquals("Http error. Status Code: 500. Message: io.supertokens.pluginInterface.exceptions.StorageQueryException: java.sql.SQLException: Simulated error in addTenantIdInTargetStorage", e.getMessage());
116116
}
117117

118118
MultitenancyQueries.simulateErrorInAddingTenantIdInTargetStorage_forTesting = false;
@@ -165,7 +165,7 @@ public void testThatCUDRecoversWhenTheDbIsDownDuringCreationButDbComesUpLater()
165165
fail();
166166
} catch (HttpResponseException e) {
167167
// ignore
168-
assertEquals("Http error. Status Code: 500. Message: java.sql.SQLException: com.zaxxer.hikari.pool.HikariPool$PoolInitializationException: Failed to initialize pool: FATAL: database \"st5000\" does not exist", e.getMessage());
168+
assertEquals("Http error. Status Code: 500. Message: io.supertokens.pluginInterface.exceptions.StorageQueryException: java.sql.SQLException: com.zaxxer.hikari.pool.HikariPool$PoolInitializationException: Failed to initialize pool: FATAL: database \"st5000\" does not exist", e.getMessage());
169169
}
170170

171171
update(start, "CREATE DATABASE st5000;", pst -> {
@@ -546,7 +546,7 @@ public void testThatTenantComesToLifeOnceTheTargetDbIsUpAfterCoreRestart() throw
546546
fail();
547547
} catch (HttpResponseException e) {
548548
// ignore
549-
assertEquals("Http error. Status Code: 500. Message: java.sql.SQLException: com.zaxxer.hikari.pool.HikariPool$PoolInitializationException: Failed to initialize pool: FATAL: database \"st5000\" does not exist", e.getMessage());
549+
assertEquals("Http error. Status Code: 500. Message: io.supertokens.pluginInterface.exceptions.StorageQueryException: java.sql.SQLException: com.zaxxer.hikari.pool.HikariPool$PoolInitializationException: Failed to initialize pool: FATAL: database \"st5000\" does not exist", e.getMessage());
550550
}
551551

552552
process.kill(false);

0 commit comments

Comments
 (0)