Skip to content

Commit 81a763b

Browse files
committed
Expect mongocryptdSpawnPath in extraOptions instead of mongocryptdPath
JAVA-3071
1 parent b735256 commit 81a763b

File tree

4 files changed

+11
-8
lines changed

4 files changed

+11
-8
lines changed

build.gradle

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -137,6 +137,7 @@ configure(javaCodeCheckedProjects) {
137137
'org.mongodb.async.type': System.getProperty('org.mongodb.async.type', 'nio2'),
138138
'org.mongodb.test.awsAccessKeyId': System.getProperty('org.mongodb.test.awsAccessKeyId'),
139139
'org.mongodb.test.awsSecretAccessKey': System.getProperty('org.mongodb.test.awsSecretAccessKey'),
140+
'org.mongodb.test.mongocryptdSpawnPath': System.getProperty('org.mongodb.test.mongocryptdSpawnPath'),
140141
'jna.library.path': System.getProperty('jna.library.path')
141142
)
142143

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

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -204,9 +204,10 @@ public void setUp() {
204204
if (extraOptionsDocument.containsKey("mongocryptdURI")) {
205205
extraOptions.put("mongocryptdURI", extraOptionsDocument.getString("mongocryptdURI").getValue());
206206
}
207-
if (System.getProperty("org.mongodb.test.mongocryptdPath") != null) {
208-
extraOptions.put("mongocryptdPath", System.getProperty("org.mongodb.test.mongocryptdPath"));
209-
}
207+
}
208+
209+
if (System.getProperty("org.mongodb.test.mongocryptdSpawnPath") != null) {
210+
extraOptions.put("mongocryptdSpawnPath", System.getProperty("org.mongodb.test.mongocryptdSpawnPath"));
210211
}
211212

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

driver-core/src/main/com/mongodb/internal/capi/MongoCryptOptionsHelper.java

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -59,8 +59,8 @@ public static MongoCryptOptions createMongoCryptOptions(final Map<String, Map<St
5959
public static List<String> createMongocryptdSpawnArgs(final Map<String, Object> options) {
6060
List<String> spawnArgs = new ArrayList<String>();
6161

62-
String path = options.containsKey("mongocryptdPath")
63-
? (String) options.get("mongocryptdPath")
62+
String path = options.containsKey("mongocryptdSpawnPath")
63+
? (String) options.get("mongocryptdSpawnPath")
6464
: "mongocryptd";
6565

6666
spawnArgs.add(path);

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

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -192,9 +192,10 @@ public void setUp() {
192192
if (extraOptionsDocument.containsKey("mongocryptdURI")) {
193193
extraOptions.put("mongocryptdURI", extraOptionsDocument.getString("mongocryptdURI").getValue());
194194
}
195-
if (System.getProperty("org.mongodb.test.mongocryptdPath") != null) {
196-
extraOptions.put("mongocryptdPath", System.getProperty("org.mongodb.test.mongocryptdPath"));
197-
}
195+
}
196+
197+
if (System.getProperty("org.mongodb.test.mongocryptdSpawnPath") != null) {
198+
extraOptions.put("mongocryptdSpawnPath", System.getProperty("org.mongodb.test.mongocryptdSpawnPath"));
198199
}
199200

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

0 commit comments

Comments
 (0)