Skip to content

Commit 95a2386

Browse files
committed
Relax assertion on invalid amazon region for CSFLE tests
1 parent 28264f4 commit 95a2386

File tree

2 files changed

+3
-3
lines changed

2 files changed

+3
-3
lines changed

driver-async/src/test/functional/com/mongodb/async/client/ClientEncryptionCustomEndpointTest.java

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -58,7 +58,7 @@ public class ClientEncryptionCustomEndpointTest {
5858
// Delay loading this class because one of the expected classes is MongoCryptException, which should only be loaded after we
5959
// determine that we're running on Java 8+ (since MongoCryptException is compiled with Java 8 target version)
6060
private final String wrappedExceptionClassName;
61-
private final String messageContainedInException;
61+
private final String messageContainedInException;
6262

6363
public ClientEncryptionCustomEndpointTest(@SuppressWarnings("unused") final String name,
6464
final BsonDocument masterKey,
@@ -154,7 +154,7 @@ public static Collection<Object[]> data() {
154154
MongoClientException.class, "java.net.ConnectException", "Connection refused"});
155155
data.add(new Object[]{"invalid amazon region in endpoint",
156156
getDefaultMasterKey().append("endpoint", new BsonString("kms.us-east-2.amazonaws.com")),
157-
MongoClientException.class, "com.mongodb.crypt.capi.MongoCryptException", "us-east-1"});
157+
MongoClientException.class, "com.mongodb.crypt.capi.MongoCryptException", null});
158158
data.add(new Object[]{"invalid endpoint host",
159159
getDefaultMasterKey().append("endpoint", new BsonString("example.com")),
160160
MongoClientException.class, "com.mongodb.crypt.capi.MongoCryptException", "parse error"});

driver-sync/src/test/functional/com/mongodb/client/ClientEncryptionCustomEndpointTest.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -143,7 +143,7 @@ public static Collection<Object[]> data() {
143143
MongoClientException.class, "java.net.ConnectException", "Connection refused"});
144144
data.add(new Object[]{"invalid amazon region in endpoint",
145145
getDefaultMasterKey().append("endpoint", new BsonString("kms.us-east-2.amazonaws.com")),
146-
MongoClientException.class, "com.mongodb.crypt.capi.MongoCryptException", "us-east-1"});
146+
MongoClientException.class, "com.mongodb.crypt.capi.MongoCryptException", null});
147147
data.add(new Object[]{"invalid endpoint host",
148148
getDefaultMasterKey().append("endpoint", new BsonString("example.com")),
149149
MongoClientException.class, "com.mongodb.crypt.capi.MongoCryptException", "parse error"});

0 commit comments

Comments
 (0)