File tree Expand file tree Collapse file tree 1 file changed +4
-1
lines changed
driver/src/test/functional/com/mongodb Expand file tree Collapse file tree 1 file changed +4
-1
lines changed Original file line number Diff line number Diff line change 30
30
import static com .mongodb .ClusterFixture .enableMaxTimeFailPoint ;
31
31
import static com .mongodb .ClusterFixture .isSharded ;
32
32
import static com .mongodb .ClusterFixture .serverVersionAtLeast ;
33
+ import static java .util .Arrays .asList ;
33
34
import static org .hamcrest .CoreMatchers .not ;
34
35
import static org .hamcrest .core .Is .is ;
35
36
import static org .junit .Assert .assertEquals ;
@@ -417,7 +418,9 @@ public void testSettingACommentInsertsCommentIntoProfileCollectionWhenProfilingI
417
418
assertEquals (1 , profileCollection .count ());
418
419
419
420
DBObject profileDocument = profileCollection .findOne ();
420
- if (serverVersionAtLeast (3 , 2 )) {
421
+ if (serverVersionAtLeast (asList (3 , 5 , 8 ))) {
422
+ assertEquals (expectedComment , ((DBObject ) profileDocument .get ("command" )).get ("comment" ));
423
+ } else if (serverVersionAtLeast (3 , 2 )) {
421
424
assertEquals (expectedComment , ((DBObject ) profileDocument .get ("query" )).get ("comment" ));
422
425
} else {
423
426
assertEquals (expectedComment , ((DBObject ) profileDocument .get ("query" )).get ("$comment" ));
You can’t perform that action at this time.
0 commit comments