From c17e300e61d427506ef57a59f9a6fb8e73d2acf4 Mon Sep 17 00:00:00 2001 From: Sattvik Chakravarthy Date: Thu, 8 Aug 2024 19:14:32 +0530 Subject: [PATCH] fix: tests --- CHANGELOG.md | 4 ++++ build.gradle | 2 +- .../test/multitenancy/TestForNoCrashDuringStartup.java | 6 +++--- 3 files changed, 8 insertions(+), 4 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index d7b13708..5be1e95c 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -7,6 +7,10 @@ to [Semantic Versioning](https://semver.org/spec/v2.0.0.html). ## [Unreleased] +## [7.1.1] - 2024-08-08 + +- Fixes tests that check for `Internal Error` in 500 status responses + ## [7.1.0] - Compatible with plugin interface version 6.2 diff --git a/build.gradle b/build.gradle index fdcd09f6..5d172564 100644 --- a/build.gradle +++ b/build.gradle @@ -2,7 +2,7 @@ plugins { id 'java-library' } -version = "7.1.0" +version = "7.1.1" repositories { mavenCentral() 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 801737fd..5081c414 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 @@ -112,7 +112,7 @@ public void testThatCUDRecoversWhenItFailsToAddEntryDuringCreation() throws Exce fail(); } catch (HttpResponseException e) { // ignore - assertTrue(e.getMessage().contains("Internal Error")); // retried creating tenant entry + assertEquals("Http error. Status Code: 500. Message: 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 - assertTrue(e.getMessage().contains("Internal Error")); // db is still down + 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()); } update(start, "CREATE DATABASE st5000;", pst -> { @@ -546,7 +546,7 @@ public void testThatTenantComesToLifeOnceTheTargetDbIsUpAfterCoreRestart() throw fail(); } catch (HttpResponseException e) { // ignore - assertTrue(e.getMessage().contains("Internal Error")); // db is still down + 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()); } process.kill(false);