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 68b223c commit fc6676f
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.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.
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.1"
version = "7.1.2"

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 @@ -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 -> {
Expand Down Expand Up @@ -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);
Expand Down

0 comments on commit fc6676f

Please sign in to comment.