Skip to content

Commit 592059e

Browse files
committed
Test: Always set cryptSharedLibPath if available
1 parent d3d1aae commit 592059e

File tree

1 file changed

+4
-5
lines changed

1 file changed

+4
-5
lines changed

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

Lines changed: 4 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -191,6 +191,10 @@ public void setUp() {
191191
}
192192

193193
Map<String, Object> extraOptions = new HashMap<>();
194+
String cryptSharedLibPath = System.getProperty("org.mongodb.test.crypt.shared.lib.path", "");
195+
if (!cryptSharedLibPath.isEmpty()) {
196+
extraOptions.put("cryptSharedLibPath", cryptSharedLibPath);
197+
}
194198
if (cryptOptions.containsKey("extraOptions")) {
195199
BsonDocument extraOptionsDocument = cryptOptions.getDocument("extraOptions");
196200
if (extraOptionsDocument.containsKey("mongocryptdSpawnArgs")) {
@@ -206,11 +210,6 @@ public void setUp() {
206210
if (extraOptionsDocument.containsKey("mongocryptdURI")) {
207211
extraOptions.put("mongocryptdURI", extraOptionsDocument.getString("mongocryptdURI").getValue());
208212
}
209-
210-
String cryptSharedLibPath = System.getProperty("org.mongodb.test.crypt.shared.lib.path", "");
211-
if (!cryptSharedLibPath.isEmpty()) {
212-
extraOptions.put("cryptSharedLibPath", cryptSharedLibPath);
213-
}
214213
}
215214

216215
Map<String, Map<String, Object>> kmsProvidersMap = new HashMap<>();

0 commit comments

Comments
 (0)