File tree Expand file tree Collapse file tree 1 file changed +6
-3
lines changed
driver-core/src/test/functional/com/mongodb/operation Expand file tree Collapse file tree 1 file changed +6
-3
lines changed Original file line number Diff line number Diff line change @@ -60,6 +60,7 @@ import static com.mongodb.CursorType.Tailable
6060import static com.mongodb.CursorType.TailableAwait
6161import static com.mongodb.ExplainVerbosity.QUERY_PLANNER
6262import static com.mongodb.connection.ServerType.STANDALONE
63+ import static java.util.Arrays.asList
6364import static java.util.concurrent.TimeUnit.MILLISECONDS
6465import static java.util.concurrent.TimeUnit.SECONDS
6566import static org.junit.Assert.assertEquals
@@ -463,10 +464,12 @@ class FindOperationSpecification extends OperationFunctionalSpecification {
463464
464465 then :
465466 Document profileDocument = profileCollectionHelper. find(). get(0 )
466- if (serverVersionAtLeast(3 , 2 )) {
467- assertEquals (expectedComment, ((Document ) profileDocument. get(' query' )). get(' comment' ));
467+ if (serverVersionAtLeast(asList(3 , 5 , 8 ))) {
468+ assertEquals (expectedComment, ((Document ) profileDocument. get(' command' )). get(' comment' ))
469+ } else if (serverVersionAtLeast(3 , 2 )) {
470+ assertEquals (expectedComment, ((Document ) profileDocument. get(' query' )). get(' comment' ))
468471 } else {
469- assertEquals (expectedComment, ((Document ) profileDocument. get(' query' )). get(' $comment' ));
472+ assertEquals (expectedComment, ((Document ) profileDocument. get(' query' )). get(' $comment' ))
470473 }
471474
472475 cleanup :
You can’t perform that action at this time.
0 commit comments