|
247 | 247 | ] |
248 | 248 | } |
249 | 249 | ] |
| 250 | + }, |
| 251 | + { |
| 252 | + "description": "Test that comment is set on getMore", |
| 253 | + "runOnRequirements": [ |
| 254 | + { |
| 255 | + "minServerVersion": "4.4.0", |
| 256 | + "topologies": [ |
| 257 | + "replicaset" |
| 258 | + ] |
| 259 | + } |
| 260 | + ], |
| 261 | + "operations": [ |
| 262 | + { |
| 263 | + "name": "createChangeStream", |
| 264 | + "object": "collection0", |
| 265 | + "arguments": { |
| 266 | + "pipeline": [], |
| 267 | + "comment": { |
| 268 | + "key": "value" |
| 269 | + } |
| 270 | + }, |
| 271 | + "saveResultAsEntity": "changeStream0" |
| 272 | + }, |
| 273 | + { |
| 274 | + "name": "insertOne", |
| 275 | + "object": "collection0", |
| 276 | + "arguments": { |
| 277 | + "document": { |
| 278 | + "_id": 1, |
| 279 | + "a": 1 |
| 280 | + } |
| 281 | + } |
| 282 | + }, |
| 283 | + { |
| 284 | + "name": "iterateUntilDocumentOrError", |
| 285 | + "object": "changeStream0" |
| 286 | + } |
| 287 | + ], |
| 288 | + "expectEvents": [ |
| 289 | + { |
| 290 | + "client": "client0", |
| 291 | + "events": [ |
| 292 | + { |
| 293 | + "commandStartedEvent": { |
| 294 | + "command": { |
| 295 | + "aggregate": "collection0", |
| 296 | + "pipeline": [ |
| 297 | + { |
| 298 | + "$changeStream": {} |
| 299 | + } |
| 300 | + ], |
| 301 | + "comment": { |
| 302 | + "key": "value" |
| 303 | + } |
| 304 | + } |
| 305 | + } |
| 306 | + }, |
| 307 | + { |
| 308 | + "commandStartedEvent": { |
| 309 | + "command": { |
| 310 | + "insert": "collection0", |
| 311 | + "documents": [ |
| 312 | + { |
| 313 | + "_id": 1, |
| 314 | + "a": 1 |
| 315 | + } |
| 316 | + ] |
| 317 | + } |
| 318 | + } |
| 319 | + }, |
| 320 | + { |
| 321 | + "commandStartedEvent": { |
| 322 | + "command": { |
| 323 | + "getMore": { |
| 324 | + "$$type": [ |
| 325 | + "int", |
| 326 | + "long" |
| 327 | + ] |
| 328 | + }, |
| 329 | + "collection": "collection0", |
| 330 | + "comment": { |
| 331 | + "key": "value" |
| 332 | + } |
| 333 | + }, |
| 334 | + "commandName": "getMore", |
| 335 | + "databaseName": "database0" |
| 336 | + } |
| 337 | + } |
| 338 | + ] |
| 339 | + } |
| 340 | + ] |
| 341 | + }, |
| 342 | + { |
| 343 | + "description": "Test that comment is not set on getMore - pre 4.4", |
| 344 | + "runOnRequirements": [ |
| 345 | + { |
| 346 | + "minServerVersion": "3.6.0", |
| 347 | + "maxServerVersion": "4.3.99", |
| 348 | + "topologies": [ |
| 349 | + "replicaset" |
| 350 | + ] |
| 351 | + } |
| 352 | + ], |
| 353 | + "operations": [ |
| 354 | + { |
| 355 | + "name": "createChangeStream", |
| 356 | + "object": "collection0", |
| 357 | + "arguments": { |
| 358 | + "pipeline": [], |
| 359 | + "comment": "comment" |
| 360 | + }, |
| 361 | + "saveResultAsEntity": "changeStream0" |
| 362 | + }, |
| 363 | + { |
| 364 | + "name": "insertOne", |
| 365 | + "object": "collection0", |
| 366 | + "arguments": { |
| 367 | + "document": { |
| 368 | + "_id": 1, |
| 369 | + "a": 1 |
| 370 | + } |
| 371 | + } |
| 372 | + }, |
| 373 | + { |
| 374 | + "name": "iterateUntilDocumentOrError", |
| 375 | + "object": "changeStream0" |
| 376 | + } |
| 377 | + ], |
| 378 | + "expectEvents": [ |
| 379 | + { |
| 380 | + "client": "client0", |
| 381 | + "events": [ |
| 382 | + { |
| 383 | + "commandStartedEvent": { |
| 384 | + "command": { |
| 385 | + "aggregate": "collection0", |
| 386 | + "pipeline": [ |
| 387 | + { |
| 388 | + "$changeStream": {} |
| 389 | + } |
| 390 | + ], |
| 391 | + "comment": "comment" |
| 392 | + } |
| 393 | + } |
| 394 | + }, |
| 395 | + { |
| 396 | + "commandStartedEvent": { |
| 397 | + "command": { |
| 398 | + "insert": "collection0", |
| 399 | + "documents": [ |
| 400 | + { |
| 401 | + "_id": 1, |
| 402 | + "a": 1 |
| 403 | + } |
| 404 | + ] |
| 405 | + } |
| 406 | + } |
| 407 | + }, |
| 408 | + { |
| 409 | + "commandStartedEvent": { |
| 410 | + "command": { |
| 411 | + "getMore": { |
| 412 | + "$$type": [ |
| 413 | + "int", |
| 414 | + "long" |
| 415 | + ] |
| 416 | + }, |
| 417 | + "collection": "collection0", |
| 418 | + "comment": { |
| 419 | + "$$exists": false |
| 420 | + } |
| 421 | + }, |
| 422 | + "commandName": "getMore", |
| 423 | + "databaseName": "database0" |
| 424 | + } |
| 425 | + } |
| 426 | + ] |
| 427 | + } |
| 428 | + ] |
250 | 429 | } |
251 | 430 | ] |
252 | 431 | } |
0 commit comments