|
3 | 3 | "schemaVersion": "1.9", |
4 | 4 | "runOnRequirements": [ |
5 | 5 | { |
6 | | - "minServerVersion": "4.4" |
| 6 | + "minServerVersion": "4.4", |
| 7 | + "serverless": "forbid" |
7 | 8 | } |
8 | 9 | ], |
9 | 10 | "createEntities": [ |
|
77 | 78 | ] |
78 | 79 | }, |
79 | 80 | { |
80 | | - "description": "error if maxAwaitTimeMS is greater than timeoutMS", |
| 81 | + "description": "error on find if maxAwaitTimeMS is greater than timeoutMS", |
81 | 82 | "operations": [ |
82 | 83 | { |
83 | 84 | "name": "find", |
|
89 | 90 | "maxAwaitTimeMS": 10 |
90 | 91 | }, |
91 | 92 | "expectError": { |
92 | | - "isClientError": true |
| 93 | + "isClientError": true, |
| 94 | + "isTimeoutError": false |
| 95 | + } |
| 96 | + } |
| 97 | + ] |
| 98 | + }, |
| 99 | + { |
| 100 | + "description": "error on aggregate if maxAwaitTimeMS is greater than timeoutMS", |
| 101 | + "operations": [ |
| 102 | + { |
| 103 | + "name": "aggregate", |
| 104 | + "object": "collection", |
| 105 | + "arguments": { |
| 106 | + "pipeline": [], |
| 107 | + "timeoutMS": 5, |
| 108 | + "maxAwaitTimeMS": 10 |
| 109 | + }, |
| 110 | + "expectError": { |
| 111 | + "isClientError": true, |
| 112 | + "isTimeoutError": false |
93 | 113 | } |
94 | 114 | } |
95 | 115 | ] |
96 | 116 | }, |
97 | 117 | { |
98 | | - "description": "error if maxAwaitTimeMS is equal to timeoutMS", |
| 118 | + "description": "error on watch if maxAwaitTimeMS is greater than timeoutMS", |
| 119 | + "operations": [ |
| 120 | + { |
| 121 | + "name": "createChangeStream", |
| 122 | + "object": "collection", |
| 123 | + "arguments": { |
| 124 | + "pipeline": [], |
| 125 | + "timeoutMS": 5, |
| 126 | + "maxAwaitTimeMS": 10 |
| 127 | + }, |
| 128 | + "expectError": { |
| 129 | + "isClientError": true, |
| 130 | + "isTimeoutError": false |
| 131 | + } |
| 132 | + } |
| 133 | + ] |
| 134 | + }, |
| 135 | + { |
| 136 | + "description": "error on find if maxAwaitTimeMS is equal to timeoutMS", |
99 | 137 | "operations": [ |
100 | 138 | { |
101 | 139 | "name": "find", |
|
107 | 145 | "maxAwaitTimeMS": 5 |
108 | 146 | }, |
109 | 147 | "expectError": { |
110 | | - "isClientError": true |
| 148 | + "isClientError": true, |
| 149 | + "isTimeoutError": false |
| 150 | + } |
| 151 | + } |
| 152 | + ] |
| 153 | + }, |
| 154 | + { |
| 155 | + "description": "error on aggregate if maxAwaitTimeMS is equal to timeoutMS", |
| 156 | + "operations": [ |
| 157 | + { |
| 158 | + "name": "aggregate", |
| 159 | + "object": "collection", |
| 160 | + "arguments": { |
| 161 | + "pipeline": [], |
| 162 | + "timeoutMS": 5, |
| 163 | + "maxAwaitTimeMS": 5 |
| 164 | + }, |
| 165 | + "expectError": { |
| 166 | + "isClientError": true, |
| 167 | + "isTimeoutError": false |
| 168 | + } |
| 169 | + } |
| 170 | + ] |
| 171 | + }, |
| 172 | + { |
| 173 | + "description": "error on watch if maxAwaitTimeMS is equal to timeoutMS", |
| 174 | + "operations": [ |
| 175 | + { |
| 176 | + "name": "createChangeStream", |
| 177 | + "object": "collection", |
| 178 | + "arguments": { |
| 179 | + "pipeline": [], |
| 180 | + "timeoutMS": 5, |
| 181 | + "maxAwaitTimeMS": 5 |
| 182 | + }, |
| 183 | + "expectError": { |
| 184 | + "isClientError": true, |
| 185 | + "isTimeoutError": false |
111 | 186 | } |
112 | 187 | } |
113 | 188 | ] |
|
417 | 492 | ] |
418 | 493 | } |
419 | 494 | ] |
| 495 | + }, |
| 496 | + { |
| 497 | + "description": "apply remaining timeoutMS if less than maxAwaitTimeMS", |
| 498 | + "operations": [ |
| 499 | + { |
| 500 | + "name": "failPoint", |
| 501 | + "object": "testRunner", |
| 502 | + "arguments": { |
| 503 | + "client": "failPointClient", |
| 504 | + "failPoint": { |
| 505 | + "configureFailPoint": "failCommand", |
| 506 | + "mode": { |
| 507 | + "times": 1 |
| 508 | + }, |
| 509 | + "data": { |
| 510 | + "failCommands": [ |
| 511 | + "getMore" |
| 512 | + ], |
| 513 | + "blockConnection": true, |
| 514 | + "blockTimeMS": 30 |
| 515 | + } |
| 516 | + } |
| 517 | + } |
| 518 | + }, |
| 519 | + { |
| 520 | + "name": "createFindCursor", |
| 521 | + "object": "collection", |
| 522 | + "arguments": { |
| 523 | + "filter": { |
| 524 | + "_id": 1 |
| 525 | + }, |
| 526 | + "cursorType": "tailableAwait", |
| 527 | + "batchSize": 1, |
| 528 | + "maxAwaitTimeMS": 100, |
| 529 | + "timeoutMS": 200 |
| 530 | + }, |
| 531 | + "saveResultAsEntity": "tailableCursor" |
| 532 | + }, |
| 533 | + { |
| 534 | + "name": "iterateOnce", |
| 535 | + "object": "tailableCursor" |
| 536 | + }, |
| 537 | + { |
| 538 | + "name": "iterateUntilDocumentOrError", |
| 539 | + "object": "tailableCursor", |
| 540 | + "expectError": { |
| 541 | + "isTimeoutError": true |
| 542 | + } |
| 543 | + } |
| 544 | + ], |
| 545 | + "expectEvents": [ |
| 546 | + { |
| 547 | + "client": "client", |
| 548 | + "ignoreExtraEvents": true, |
| 549 | + "events": [ |
| 550 | + { |
| 551 | + "commandStartedEvent": { |
| 552 | + "commandName": "find", |
| 553 | + "databaseName": "test" |
| 554 | + } |
| 555 | + }, |
| 556 | + { |
| 557 | + "commandStartedEvent": { |
| 558 | + "commandName": "getMore", |
| 559 | + "databaseName": "test", |
| 560 | + "command": { |
| 561 | + "maxTimeMS": { |
| 562 | + "$$lte": 100 |
| 563 | + } |
| 564 | + } |
| 565 | + } |
| 566 | + }, |
| 567 | + { |
| 568 | + "commandStartedEvent": { |
| 569 | + "commandName": "getMore", |
| 570 | + "databaseName": "test", |
| 571 | + "command": { |
| 572 | + "maxTimeMS": { |
| 573 | + "$$lte": 70 |
| 574 | + } |
| 575 | + } |
| 576 | + } |
| 577 | + } |
| 578 | + ] |
| 579 | + } |
| 580 | + ] |
| 581 | + }, |
| 582 | + { |
| 583 | + "description": "apply maxAwaitTimeMS if less than remaining timeout", |
| 584 | + "operations": [ |
| 585 | + { |
| 586 | + "name": "createFindCursor", |
| 587 | + "object": "collection", |
| 588 | + "arguments": { |
| 589 | + "filter": {}, |
| 590 | + "cursorType": "tailableAwait", |
| 591 | + "batchSize": 1, |
| 592 | + "maxAwaitTimeMS": 100, |
| 593 | + "timeoutMS": 200 |
| 594 | + }, |
| 595 | + "saveResultAsEntity": "tailableCursor" |
| 596 | + }, |
| 597 | + { |
| 598 | + "name": "iterateOnce", |
| 599 | + "object": "tailableCursor" |
| 600 | + }, |
| 601 | + { |
| 602 | + "name": "iterateOnce", |
| 603 | + "object": "tailableCursor" |
| 604 | + } |
| 605 | + ], |
| 606 | + "expectEvents": [ |
| 607 | + { |
| 608 | + "client": "client", |
| 609 | + "events": [ |
| 610 | + { |
| 611 | + "commandStartedEvent": { |
| 612 | + "commandName": "find", |
| 613 | + "databaseName": "test" |
| 614 | + } |
| 615 | + }, |
| 616 | + { |
| 617 | + "commandStartedEvent": { |
| 618 | + "commandName": "getMore", |
| 619 | + "databaseName": "test", |
| 620 | + "command": { |
| 621 | + "maxTimeMS": { |
| 622 | + "$$lte": 100 |
| 623 | + } |
| 624 | + } |
| 625 | + } |
| 626 | + } |
| 627 | + ] |
| 628 | + } |
| 629 | + ] |
420 | 630 | } |
421 | 631 | ] |
422 | 632 | } |
0 commit comments