Skip to content

Commit

Permalink
fix: tests
Browse files Browse the repository at this point in the history
  • Loading branch information
sattvikc committed Aug 8, 2024
1 parent 774b366 commit c17e300
Show file tree
Hide file tree
Showing 3 changed files with 8 additions and 4 deletions.
4 changes: 4 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
2 changes: 1 addition & 1 deletion build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ plugins {
id 'java-library'
}

version = "7.1.0"
version = "7.1.1"

repositories {
mavenCentral()
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand Down Expand Up @@ -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 -> {
Expand Down Expand Up @@ -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);
Expand Down

0 comments on commit c17e300

Please sign in to comment.