From 95a2386f929213b6f71d1e11be25ae1937a92b39 Mon Sep 17 00:00:00 2001 From: jyemin Date: Tue, 12 Apr 2022 08:44:41 -0400 Subject: [PATCH] Relax assertion on invalid amazon region for CSFLE tests --- .../async/client/ClientEncryptionCustomEndpointTest.java | 4 ++-- .../mongodb/client/ClientEncryptionCustomEndpointTest.java | 2 +- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/driver-async/src/test/functional/com/mongodb/async/client/ClientEncryptionCustomEndpointTest.java b/driver-async/src/test/functional/com/mongodb/async/client/ClientEncryptionCustomEndpointTest.java index 1e7ced58a11..8f0bfbc13cd 100644 --- a/driver-async/src/test/functional/com/mongodb/async/client/ClientEncryptionCustomEndpointTest.java +++ b/driver-async/src/test/functional/com/mongodb/async/client/ClientEncryptionCustomEndpointTest.java @@ -58,7 +58,7 @@ public class ClientEncryptionCustomEndpointTest { // Delay loading this class because one of the expected classes is MongoCryptException, which should only be loaded after we // determine that we're running on Java 8+ (since MongoCryptException is compiled with Java 8 target version) private final String wrappedExceptionClassName; - private final String messageContainedInException; + private final String messageContainedInException; public ClientEncryptionCustomEndpointTest(@SuppressWarnings("unused") final String name, final BsonDocument masterKey, @@ -154,7 +154,7 @@ public static Collection data() { MongoClientException.class, "java.net.ConnectException", "Connection refused"}); data.add(new Object[]{"invalid amazon region in endpoint", getDefaultMasterKey().append("endpoint", new BsonString("kms.us-east-2.amazonaws.com")), - MongoClientException.class, "com.mongodb.crypt.capi.MongoCryptException", "us-east-1"}); + MongoClientException.class, "com.mongodb.crypt.capi.MongoCryptException", null}); data.add(new Object[]{"invalid endpoint host", getDefaultMasterKey().append("endpoint", new BsonString("example.com")), MongoClientException.class, "com.mongodb.crypt.capi.MongoCryptException", "parse error"}); diff --git a/driver-sync/src/test/functional/com/mongodb/client/ClientEncryptionCustomEndpointTest.java b/driver-sync/src/test/functional/com/mongodb/client/ClientEncryptionCustomEndpointTest.java index 3414c6b52a2..ed7333b5273 100644 --- a/driver-sync/src/test/functional/com/mongodb/client/ClientEncryptionCustomEndpointTest.java +++ b/driver-sync/src/test/functional/com/mongodb/client/ClientEncryptionCustomEndpointTest.java @@ -143,7 +143,7 @@ public static Collection data() { MongoClientException.class, "java.net.ConnectException", "Connection refused"}); data.add(new Object[]{"invalid amazon region in endpoint", getDefaultMasterKey().append("endpoint", new BsonString("kms.us-east-2.amazonaws.com")), - MongoClientException.class, "com.mongodb.crypt.capi.MongoCryptException", "us-east-1"}); + MongoClientException.class, "com.mongodb.crypt.capi.MongoCryptException", null}); data.add(new Object[]{"invalid endpoint host", getDefaultMasterKey().append("endpoint", new BsonString("example.com")), MongoClientException.class, "com.mongodb.crypt.capi.MongoCryptException", "parse error"});