Skip to content

Commit 45630a4

Browse files
committed
So that tests run on MongoDB versions prior to 3.0, don't assume that the serverStatus command reply contains a storageEngine document
1 parent 8a55003 commit 45630a4

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

driver-core/src/test/functional/com/mongodb/ClusterFixture.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -134,7 +134,7 @@ public static boolean supportsFsync() {
134134
Document serverStatus = getServerStatus();
135135
Document storageEngine = (Document) serverStatus.get("storageEngine");
136136

137-
return !storageEngine.get("name").equals("inMemory");
137+
return storageEngine != null && !storageEngine.get("name").equals("inMemory");
138138
}
139139

140140
private static ServerVersion getConnectedServerVersion() {

0 commit comments

Comments
 (0)