Skip to content

Commit 9a8f40a

Browse files
authored
PHPLIB-1156: Use more flexible getMore cursor ID assertions (#1089)
Synced with mongodb/specifications@2a51e98
1 parent bf36331 commit 9a8f40a

File tree

4 files changed

+64
-16
lines changed

4 files changed

+64
-16
lines changed

tests/SpecTests/client-side-encryption/tests/getMore.json

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -216,7 +216,10 @@
216216
"command_started_event": {
217217
"command": {
218218
"getMore": {
219-
"$$type": "long"
219+
"$$type": [
220+
"int",
221+
"long"
222+
]
220223
},
221224
"collection": "default",
222225
"batchSize": 2

tests/UnifiedSpecTests/load-balancers/cursors.json

Lines changed: 44 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -222,7 +222,10 @@
222222
"reply": {
223223
"cursor": {
224224
"id": {
225-
"$$type": "long"
225+
"$$type": [
226+
"int",
227+
"long"
228+
]
226229
},
227230
"firstBatch": {
228231
"$$type": "array"
@@ -239,7 +242,10 @@
239242
"commandStartedEvent": {
240243
"command": {
241244
"getMore": {
242-
"$$type": "long"
245+
"$$type": [
246+
"int",
247+
"long"
248+
]
243249
},
244250
"collection": "coll0"
245251
},
@@ -333,7 +339,10 @@
333339
"reply": {
334340
"cursor": {
335341
"id": {
336-
"$$type": "long"
342+
"$$type": [
343+
"int",
344+
"long"
345+
]
337346
},
338347
"firstBatch": {
339348
"$$type": "array"
@@ -475,7 +484,10 @@
475484
"reply": {
476485
"cursor": {
477486
"id": {
478-
"$$type": "long"
487+
"$$type": [
488+
"int",
489+
"long"
490+
]
479491
},
480492
"firstBatch": {
481493
"$$type": "array"
@@ -492,7 +504,10 @@
492504
"commandStartedEvent": {
493505
"command": {
494506
"getMore": {
495-
"$$type": "long"
507+
"$$type": [
508+
"int",
509+
"long"
510+
]
496511
},
497512
"collection": "coll0"
498513
},
@@ -605,7 +620,10 @@
605620
"reply": {
606621
"cursor": {
607622
"id": {
608-
"$$type": "long"
623+
"$$type": [
624+
"int",
625+
"long"
626+
]
609627
},
610628
"firstBatch": {
611629
"$$type": "array"
@@ -750,7 +768,10 @@
750768
"reply": {
751769
"cursor": {
752770
"id": {
753-
"$$type": "long"
771+
"$$type": [
772+
"int",
773+
"long"
774+
]
754775
},
755776
"firstBatch": {
756777
"$$type": "array"
@@ -767,7 +788,10 @@
767788
"commandStartedEvent": {
768789
"command": {
769790
"getMore": {
770-
"$$type": "long"
791+
"$$type": [
792+
"int",
793+
"long"
794+
]
771795
},
772796
"collection": "coll0"
773797
},
@@ -858,7 +882,10 @@
858882
"commandStartedEvent": {
859883
"command": {
860884
"getMore": {
861-
"$$type": "long"
885+
"$$type": [
886+
"int",
887+
"long"
888+
]
862889
},
863890
"collection": "coll0"
864891
},
@@ -950,7 +977,10 @@
950977
"commandStartedEvent": {
951978
"command": {
952979
"getMore": {
953-
"$$type": "long"
980+
"$$type": [
981+
"int",
982+
"long"
983+
]
954984
},
955985
"collection": {
956986
"$$type": "string"
@@ -1100,7 +1130,10 @@
11001130
"commandStartedEvent": {
11011131
"command": {
11021132
"getMore": {
1103-
"$$type": "long"
1133+
"$$type": [
1134+
"int",
1135+
"long"
1136+
]
11041137
},
11051138
"collection": "coll0"
11061139
},

tests/UnifiedSpecTests/valid-pass/entity-cursor-iterateOnce.json

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -93,7 +93,10 @@
9393
"commandStartedEvent": {
9494
"command": {
9595
"getMore": {
96-
"$$type": "long"
96+
"$$type": [
97+
"int",
98+
"long"
99+
]
97100
},
98101
"collection": "coll0"
99102
},

tests/UnifiedSpecTests/valid-pass/entity-find-cursor.json

Lines changed: 12 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -109,7 +109,10 @@
109109
"reply": {
110110
"cursor": {
111111
"id": {
112-
"$$type": "long"
112+
"$$type": [
113+
"int",
114+
"long"
115+
]
113116
},
114117
"ns": {
115118
"$$type": "string"
@@ -126,7 +129,10 @@
126129
"commandStartedEvent": {
127130
"command": {
128131
"getMore": {
129-
"$$type": "long"
132+
"$$type": [
133+
"int",
134+
"long"
135+
]
130136
},
131137
"collection": "coll0"
132138
},
@@ -138,7 +144,10 @@
138144
"reply": {
139145
"cursor": {
140146
"id": {
141-
"$$type": "long"
147+
"$$type": [
148+
"int",
149+
"long"
150+
]
142151
},
143152
"ns": {
144153
"$$type": "string"

0 commit comments

Comments
 (0)