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 02f26e9 commit c1b1e7c
Showing 1 changed file with 1 addition and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -132,7 +132,7 @@ 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");
}
}

Expand Down

0 comments on commit c1b1e7c

Please sign in to comment.