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 3030import static com .mongodb .ClusterFixture .enableMaxTimeFailPoint ;
3131import static com .mongodb .ClusterFixture .isSharded ;
3232import static com .mongodb .ClusterFixture .serverVersionAtLeast ;
33+ import static java .util .Arrays .asList ;
3334import static org .hamcrest .CoreMatchers .not ;
3435import static org .hamcrest .core .Is .is ;
3536import static org .junit .Assert .assertEquals ;
@@ -417,7 +418,9 @@ public void testSettingACommentInsertsCommentIntoProfileCollectionWhenProfilingI
417418 assertEquals (1 , profileCollection .count ());
418419
419420 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 )) {
421424 assertEquals (expectedComment , ((DBObject ) profileDocument .get ("query" )).get ("comment" ));
422425 } else {
423426 assertEquals (expectedComment , ((DBObject ) profileDocument .get ("query" )).get ("$comment" ));
You can’t perform that action at this time.
0 commit comments