@@ -24,6 +24,7 @@ import spock.lang.IgnoreIf
2424import spock.lang.Subject
2525
2626import static com.mongodb.ClusterFixture.serverVersionAtLeast
27+ import static com.mongodb.ClusterFixture.serverVersionGreaterThan
2728
2829class DBCursorFunctionalSpecification extends FunctionalSpecification {
2930
@@ -51,7 +52,7 @@ class DBCursorFunctionalSpecification extends FunctionalSpecification {
5152 1 * decoder. decode(_ as byte [], collection)
5253 }
5354
54- @IgnoreIf ({ serverVersionAtLeast(3 , 0 ) })
55+ @IgnoreIf ({ serverVersionAtLeast(3 , 0 ) || serverVersionGreaterThan( ' 5.0 ' ) })
5556 def ' should use provided hints for queries' () {
5657 given :
5758 collection. createIndex(new BasicDBObject (' a' , 1 ))
@@ -69,7 +70,7 @@ class DBCursorFunctionalSpecification extends FunctionalSpecification {
6970 dbCursor. explain(). get(' cursor' ) == ' BtreeCursor a_1'
7071 }
7172
72- @IgnoreIf ({ !serverVersionAtLeast(3 , 0 ) })
73+ @IgnoreIf ({ !serverVersionAtLeast(3 , 0 ) || serverVersionGreaterThan( ' 5.0 ' ) })
7374 def ' should use provided hints for queries mongod > 3.0' () {
7475 given :
7576 collection. createIndex(new BasicDBObject (' a' , 1 ))
@@ -115,7 +116,7 @@ class DBCursorFunctionalSpecification extends FunctionalSpecification {
115116 }
116117
117118
118- @IgnoreIf ({ !serverVersionAtLeast(3 , 0 ) })
119+ @IgnoreIf ({ !serverVersionAtLeast(3 , 0 ) || serverVersionGreaterThan( ' 5.0 ' ) })
119120 def ' should use provided string hints for queries mongodb > 2.7' () {
120121 given :
121122 collection. createIndex(new BasicDBObject (' a' , 1 ))
@@ -198,7 +199,7 @@ class DBCursorFunctionalSpecification extends FunctionalSpecification {
198199 dbCursor. next(). get(' cursor' ) == ' BtreeCursor a_1'
199200 }
200201
201- @IgnoreIf ({ !serverVersionAtLeast(3 , 0 ) })
202+ @IgnoreIf ({ !serverVersionAtLeast(3 , 0 ) || serverVersionGreaterThan( ' 5.0 ' ) })
202203 def ' should be able to use addSpecial with $explain mongod > 2.7' () {
203204 given :
204205 collection. createIndex(new BasicDBObject (' a' , 1 ))
0 commit comments