@@ -24,6 +24,7 @@ import spock.lang.IgnoreIf
24
24
import spock.lang.Subject
25
25
26
26
import static com.mongodb.ClusterFixture.serverVersionAtLeast
27
+ import static com.mongodb.ClusterFixture.serverVersionGreaterThan
27
28
28
29
class DBCursorFunctionalSpecification extends FunctionalSpecification {
29
30
@@ -51,7 +52,7 @@ class DBCursorFunctionalSpecification extends FunctionalSpecification {
51
52
1 * decoder. decode(_ as byte [], collection)
52
53
}
53
54
54
- @IgnoreIf ({ serverVersionAtLeast(3 , 0 ) })
55
+ @IgnoreIf ({ serverVersionAtLeast(3 , 0 ) || serverVersionGreaterThan( ' 5.0 ' ) })
55
56
def ' should use provided hints for queries' () {
56
57
given :
57
58
collection. createIndex(new BasicDBObject (' a' , 1 ))
@@ -69,7 +70,7 @@ class DBCursorFunctionalSpecification extends FunctionalSpecification {
69
70
dbCursor. explain(). get(' cursor' ) == ' BtreeCursor a_1'
70
71
}
71
72
72
- @IgnoreIf ({ !serverVersionAtLeast(3 , 0 ) })
73
+ @IgnoreIf ({ !serverVersionAtLeast(3 , 0 ) || serverVersionGreaterThan( ' 5.0 ' ) })
73
74
def ' should use provided hints for queries mongod > 3.0' () {
74
75
given :
75
76
collection. createIndex(new BasicDBObject (' a' , 1 ))
@@ -115,7 +116,7 @@ class DBCursorFunctionalSpecification extends FunctionalSpecification {
115
116
}
116
117
117
118
118
- @IgnoreIf ({ !serverVersionAtLeast(3 , 0 ) })
119
+ @IgnoreIf ({ !serverVersionAtLeast(3 , 0 ) || serverVersionGreaterThan( ' 5.0 ' ) })
119
120
def ' should use provided string hints for queries mongodb > 2.7' () {
120
121
given :
121
122
collection. createIndex(new BasicDBObject (' a' , 1 ))
@@ -198,7 +199,7 @@ class DBCursorFunctionalSpecification extends FunctionalSpecification {
198
199
dbCursor. next(). get(' cursor' ) == ' BtreeCursor a_1'
199
200
}
200
201
201
- @IgnoreIf ({ !serverVersionAtLeast(3 , 0 ) })
202
+ @IgnoreIf ({ !serverVersionAtLeast(3 , 0 ) || serverVersionGreaterThan( ' 5.0 ' ) })
202
203
def ' should be able to use addSpecial with $explain mongod > 2.7' () {
203
204
given :
204
205
collection. createIndex(new BasicDBObject (' a' , 1 ))
0 commit comments