From fc6676f59ee65363391e7e59fbe731d2bea493a4 Mon Sep 17 00:00:00 2001 From: Sattvik Chakravarthy Date: Thu, 8 Aug 2024 19:11:15 +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 3a690b5..c649fd3 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.2] - 2024-08-08 + +- Fixes tests that check for `Internal Error` in 500 status responses + ## [7.1.1] - 2024-06-29 - Fixes issue where `is_third_party_providers_null` is added to the `tenant_configs` table. diff --git a/build.gradle b/build.gradle index af9bc2f..e30408b 100644 --- a/build.gradle +++ b/build.gradle @@ -2,7 +2,7 @@ plugins { id 'java-library' } -version = "7.1.1" +version = "7.1.2" repositories { mavenCentral() diff --git a/src/test/java/io/supertokens/storage/mysql/test/multitenancy/TestForNoCrashDuringStartup.java b/src/test/java/io/supertokens/storage/mysql/test/multitenancy/TestForNoCrashDuringStartup.java index 5828e42..41fe7be 100644 --- a/src/test/java/io/supertokens/storage/mysql/test/multitenancy/TestForNoCrashDuringStartup.java +++ b/src/test/java/io/supertokens/storage/mysql/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; @@ -162,7 +162,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: Could not connect to address=(host=localhost)(port=3306)(type=master) : (conn=2381) Unknown database 'st5000'", e.getMessage()); } update(start, "CREATE DATABASE st5000;", pst -> { @@ -540,7 +540,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: Could not connect to address=(host=localhost)(port=3306)(type=master) : (conn=2509) Unknown database 'st5000'", e.getMessage()); } process.kill(false);