Skip to content

Commit

Permalink
Fix failing test cases
Browse files Browse the repository at this point in the history
  • Loading branch information
kaneeldias committed Aug 16, 2023
1 parent 65c6337 commit 51689e9
Showing 1 changed file with 4 additions and 5 deletions.
9 changes: 4 additions & 5 deletions ballerina/tests/01-connection-init-test.bal
Original file line number Diff line number Diff line change
Expand Up @@ -179,7 +179,7 @@ isolated function testWithOptionsWithErroneousSSL() returns error? {
test:assertTrue(oracledbClient2 is error);
if oracledbClient2 is sql:ApplicationError {
test:assertTrue(oracledbClient2.message().startsWith("Error in SQL connector configuration: Failed to initialize pool: " +
"IO Error: Connection closed"));
"IO Error: Connection closed"), oracledbClient2.message());
} else {
test:assertFail("Error Application Error expected");
}
Expand Down Expand Up @@ -226,13 +226,13 @@ function testWithOptionsWithErroneousSSLCorrectPort() returns error? {
user = USER,
password = PASSWORD,
port = SSL_PORT,
database = DATABASE,
database = DATABASE,
options = options
);
test:assertTrue(oracledbClient is error);
if oracledbClient is sql:ApplicationError {
test:assertTrue(oracledbClient.message().startsWith("Error in SQL connector configuration: Failed to initialize pool: " +
"ORA-17002: IO Error: IO Error PKIX path building failed: unable to find valid certification path to requested target"),
"ORA-17002: I/O error: IO Error PKIX path building failed: unable to find valid certification path to requested target"),
oracledbClient.message());
} else {
test:assertFail("Application Error expected");
Expand Down Expand Up @@ -263,8 +263,7 @@ function testWithOptionsWithErroneousSSLWrongPW() returns error? {
);
test:assertTrue(oracledbClient is error);
if oracledbClient is sql:ApplicationError {
test:assertTrue(oracledbClient.message().endsWith("Error in SQL connector configuration: Failed to initialize " +
"pool: ORA-17958: Unable to initialize the trust store."), oracledbClient.message());
test:assertTrue(oracledbClient.message().includes("keystore password was incorrect"), oracledbClient.message());
} else {
test:assertFail("Error ApplicationError expected");
}
Expand Down

0 comments on commit 51689e9

Please sign in to comment.