From dcc59a9591ea9630bdb90f8b5bdb0a39424c02c8 Mon Sep 17 00:00:00 2001 From: Tamas Soltesz Date: Thu, 26 Dec 2024 07:56:28 +0100 Subject: [PATCH] fix: fixing tests (#239) --- .../test/multitenancy/TestForNoCrashDuringStartup.java | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/src/test/java/io/supertokens/storage/postgresql/test/multitenancy/TestForNoCrashDuringStartup.java b/src/test/java/io/supertokens/storage/postgresql/test/multitenancy/TestForNoCrashDuringStartup.java index 5081c414..0f34f815 100644 --- a/src/test/java/io/supertokens/storage/postgresql/test/multitenancy/TestForNoCrashDuringStartup.java +++ b/src/test/java/io/supertokens/storage/postgresql/test/multitenancy/TestForNoCrashDuringStartup.java @@ -48,8 +48,8 @@ import java.io.IOException; -import static org.junit.Assert.*; import static io.supertokens.storage.postgresql.QueryExecutorTemplate.update; +import static org.junit.Assert.*; public class TestForNoCrashDuringStartup { TestingProcessManager.TestingProcess process; @@ -112,7 +112,7 @@ public void testThatCUDRecoversWhenItFailsToAddEntryDuringCreation() throws Exce fail(); } catch (HttpResponseException e) { // ignore - assertEquals("Http error. Status Code: 500. Message: java.sql.SQLException: Simulated error in addTenantIdInTargetStorage", e.getMessage()); + assertEquals("Http error. Status Code: 500. Message: io.supertokens.pluginInterface.exceptions.StorageQueryException: java.sql.SQLException: Simulated error in addTenantIdInTargetStorage", e.getMessage()); } MultitenancyQueries.simulateErrorInAddingTenantIdInTargetStorage_forTesting = false; @@ -165,7 +165,7 @@ public void testThatCUDRecoversWhenTheDbIsDownDuringCreationButDbComesUpLater() fail(); } catch (HttpResponseException e) { // ignore - 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()); + 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()); } update(start, "CREATE DATABASE st5000;", pst -> { @@ -546,7 +546,7 @@ public void testThatTenantComesToLifeOnceTheTargetDbIsUpAfterCoreRestart() throw fail(); } catch (HttpResponseException e) { // ignore - 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()); + 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()); } process.kill(false);