Skip to content

Commit

Permalink
test: fix assert for testConnectWithCredentialsAndOAuthToken
Browse files Browse the repository at this point in the history
testConnectWithCredentialsAndOAuthToken test was failing with following error -
JdbcDriverTest.testConnectWithCredentialsAndOAuthToken:135 expected to contain: Cannot specify both credentials and an OAuth token
but was : INVALID_ARGUMENT: Specify only one of credentialsUrl, encodedCredentials, credentialsProvider and OAuth token.

Changing assertThat to account for this change. The exception message was changed as part of googleapis/java-spanner#1869.
  • Loading branch information
rajatbhatta authored May 26, 2022
1 parent 1936283 commit 4c562c5
Showing 1 changed file with 3 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -132,8 +132,9 @@ public void testConnectWithCredentialsAndOAuthToken() {
server.getPort(), TEST_KEY_PATH, "some-token"))) {
fail("missing expected exception");
} catch (SQLException e) {
assertThat(e.getMessage()).contains("Cannot specify both credentials and an OAuth token");
}
assertThat(e.getMessage())
.contains(
"Specify only one of credentialsUrl, encodedCredentials, credentialsProvider and OAuth token");
}

@Test
Expand Down

0 comments on commit 4c562c5

Please sign in to comment.