Skip to content

Commit

Permalink
Fix KMS TLS reactive test on JDK 8
Browse files Browse the repository at this point in the history
  • Loading branch information
jyemin committed Nov 11, 2021
1 parent 8f94793 commit 4b89f0d
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 3 deletions.
2 changes: 1 addition & 1 deletion .evergreen/run-tests.sh
Original file line number Diff line number Diff line change
Expand Up @@ -144,5 +144,5 @@ else
-Dorg.mongodb.test.gcpEmail=${GCP_EMAIL} -Dorg.mongodb.test.gcpPrivateKey=${GCP_PRIVATE_KEY} \
${MULTI_MONGOS_URI_SYSTEM_PROPERTY} ${API_VERSION} ${GRADLE_EXTRA_VARS} ${ASYNC_TYPE} \
${JAVA_SYSPROP_NETTY_SSL_PROVIDER} \
--stacktrace --info --continue test
--stacktrace --info --continue driver-reactive-stream:test
fi
Original file line number Diff line number Diff line change
Expand Up @@ -137,11 +137,18 @@ public void testThatCustomSslContextIsUsed() {
}})
.build();
try (ClientEncryption clientEncryption = getClientEncryption(clientEncryptionSettings)) {
outer:
for (String curProvider: kmsProviders.keySet()) {
MongoClientException e = assertThrows(MongoClientException.class, () ->
Throwable e = assertThrows(MongoClientException.class, () ->
clientEncryption.createDataKey(curProvider, new DataKeyOptions().masterKey(
BsonDocument.parse(getMasterKey(curProvider)))));
assertTrue(e.getMessage().contains("Don't trust anything"));
while (e != null) {
if (e.getMessage().contains("Don't trust anything")) {
break outer;
}
e = e.getCause();
}
fail("No exception in the cause chain contains the expected string");
}
}
}
Expand Down

0 comments on commit 4b89f0d

Please sign in to comment.