Skip to content

Commit

Permalink
fix integration tests
Browse files Browse the repository at this point in the history
  • Loading branch information
stepansergeevitch committed Sep 2, 2024
1 parent 245cf2e commit 1b47ce0
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -136,7 +136,8 @@ void shouldFailToSelectFromCustomDbUsingSystemEngine() throws SQLException {
}
FireboltException e = assertThrows(FireboltException.class, () -> systemConnection.createStatement().executeQuery("select count(*) from dummy"));
String actualErrorMessage = e.getErrorMessageFromServer().replaceAll("\r?\n", "");
assertTrue(expectedErrorMessages.contains(actualErrorMessage), "Unexpected error message: " + actualErrorMessage);
// Check that at least one error message from expectedErrorMessages is contained in the actual error message
assertTrue(expectedErrorMessages.stream().anyMatch(actualErrorMessage::contains), "Unexpected error message: " + actualErrorMessage);
} finally {
try {
customConnection.createStatement().executeUpdate("DROP TABLE dummy");
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -314,9 +314,12 @@ private Map<String, String> getAllParameters(FireboltProperties fireboltProperti
}
} else {
if (connection.getInfraVersion() >= 2) {
String engine = fireboltProperties.getEngine();
if (accountId != null) {
params.put(FireboltQueryParameterKey.ACCOUNT_ID.getKey(), accountId);
params.put(FireboltQueryParameterKey.ENGINE.getKey(), fireboltProperties.getEngine());
}
if (engine != null) {
params.put(FireboltQueryParameterKey.ENGINE.getKey(), engine);
}
params.put(FireboltQueryParameterKey.QUERY_LABEL.getKey(), statementInfoWrapper.getLabel()); //QUERY_LABEL
}
Expand Down

0 comments on commit 1b47ce0

Please sign in to comment.