Skip to content

Commit 9343427

Browse files
authored
fix: tests (#222)
1 parent 774b366 commit 9343427

File tree

3 files changed

+8
-4
lines changed

3 files changed

+8
-4
lines changed

CHANGELOG.md

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -7,6 +7,10 @@ to [Semantic Versioning](https://semver.org/spec/v2.0.0.html).
77

88
## [Unreleased]
99

10+
## [7.1.1] - 2024-08-08
11+
12+
- Fixes tests that check for `Internal Error` in 500 status responses
13+
1014
## [7.1.0]
1115

1216
- Compatible with plugin interface version 6.2

build.gradle

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@ plugins {
22
id 'java-library'
33
}
44

5-
version = "7.1.0"
5+
version = "7.1.1"
66

77
repositories {
88
mavenCentral()

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

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -112,7 +112,7 @@ public void testThatCUDRecoversWhenItFailsToAddEntryDuringCreation() throws Exce
112112
fail();
113113
} catch (HttpResponseException e) {
114114
// ignore
115-
assertTrue(e.getMessage().contains("Internal Error")); // retried creating tenant entry
115+
assertEquals("Http error. Status Code: 500. Message: 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-
assertTrue(e.getMessage().contains("Internal Error")); // db is still down
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());
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-
assertTrue(e.getMessage().contains("Internal Error")); // db is still down
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());
550550
}
551551

552552
process.kill(false);

0 commit comments

Comments
 (0)