[SERVER-26503] Fix incorrect uses of assert.throws() Created: 06/Oct/16 Updated: 19/Nov/16 Resolved: 13/Oct/16 |
|
| Status: | Closed |
| Project: | Core Server |
| Component/s: | Testing Infrastructure |
| Affects Version/s: | 3.3.15 |
| Fix Version/s: | 3.4.0-rc1 |
| Type: | Bug | Priority: | Major - P3 |
| Reporter: | Robert Guo (Inactive) | Assignee: | Robert Guo (Inactive) |
| Resolution: | Done | Votes: | 0 |
| Labels: | None | ||
| Remaining Estimate: | Not Specified | ||
| Time Spent: | Not Specified | ||
| Original Estimate: | Not Specified | ||
| Issue Links: |
|
||||||||||||
| Backwards Compatibility: | Fully Compatible | ||||||||||||
| Operating System: | ALL | ||||||||||||
| Sprint: | TIG 2016-10-10, TIG 2016-10-31 | ||||||||||||
| Participants: | |||||||||||||
| Linked BF Score: | 0 | ||||||||||||
| Description |
|
Some tests use assert.throws() incorrectly. They need to be fixed before the changes in |
| Comments |
| Comment by Githook User [ 31/Oct/16 ] | ||||||||||||||||||||||||||||||
|
Author: {u'username': u'guoyr', u'name': u'Robert Guo', u'email': u'robert.guo@10gen.com'}Message: | ||||||||||||||||||||||||||||||
| Comment by Githook User [ 28/Oct/16 ] | ||||||||||||||||||||||||||||||
|
Author: {u'username': u'guoyr', u'name': u'Robert Guo', u'email': u'robert.guo@10gen.com'}Message: | ||||||||||||||||||||||||||||||
| Comment by Githook User [ 13/Oct/16 ] | ||||||||||||||||||||||||||||||
|
Author: {u'username': u'guoyr', u'name': u'Robert Guo', u'email': u'robert.guo@10gen.com'}Message: | ||||||||||||||||||||||||||||||
| Comment by Max Hirschhorn [ 12/Oct/16 ] | ||||||||||||||||||||||||||||||
|
Reverted due to task failures that these changes were causing in Evergreen.
The mongo shell will send a find as an OP_QUERY message on the collection when using the "legacy" read mode in the mongo shell, rather than as an OP_QUERY or OP_COMMAND message on the $cmd namespace (i.e. as a "find" command). An error is returned to the client as a single document from the cursor with a special $err field.
We should instead assert that calling next() on the cursor throws an error. It may be useful to only do so when using "legacy" read mode to avoid masking an issue because the collection is empty.
The contents of the jstests/core/ord.js test likely needs to be wrapped in an IIFE to avoid declaring the variables t and c in the global scope. | ||||||||||||||||||||||||||||||
| Comment by Githook User [ 12/Oct/16 ] | ||||||||||||||||||||||||||||||
|
Author: {u'username': u'visemet', u'name': u'Max Hirschhorn', u'email': u'max.hirschhorn@mongodb.com'}Message: Revert " This reverts commit 1126f5411b19c87b3447ada413f11bfb0b466908. | ||||||||||||||||||||||||||||||
| Comment by Githook User [ 11/Oct/16 ] | ||||||||||||||||||||||||||||||
|
Author: {u'username': u'guoyr', u'name': u'Robert Guo', u'email': u'robert.guo@10gen.com'}Message: |