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
60
60
import static com.mongodb.CursorType.TailableAwait
61
61
import static com.mongodb.ExplainVerbosity.QUERY_PLANNER
62
62
import static com.mongodb.connection.ServerType.STANDALONE
63
+ import static java.util.Arrays.asList
63
64
import static java.util.concurrent.TimeUnit.MILLISECONDS
64
65
import static java.util.concurrent.TimeUnit.SECONDS
65
66
import static org.junit.Assert.assertEquals
@@ -463,10 +464,12 @@ class FindOperationSpecification extends OperationFunctionalSpecification {
463
464
464
465
then :
465
466
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' ))
468
471
} else {
469
- assertEquals (expectedComment, ((Document ) profileDocument. get(' query' )). get(' $comment' ));
472
+ assertEquals (expectedComment, ((Document ) profileDocument. get(' query' )). get(' $comment' ))
470
473
}
471
474
472
475
cleanup :
You can’t perform that action at this time.
0 commit comments