[SERVER-25904] include expected error codes in jstests/readonly/write_ops.js Created: 31/Aug/16  Updated: 05/Apr/17  Resolved: 12/Dec/16

Status: Closed
Project: Core Server
Component/s: Storage
Affects Version/s: None
Fix Version/s: 3.5.1

Type: Improvement Priority: Major - P3
Reporter: Esha Maharishi (Inactive) Assignee: Kyle Suarez
Resolution: Done Votes: 0
Labels: neweng
Remaining Estimate: Not Specified
Time Spent: Not Specified
Original Estimate: Not Specified

Backwards Compatibility: Fully Compatible
Sprint: Query 2016-12-12, Query 2017-01-23
Participants:

 Description   

To prevent false positives, the following lines should include the appropriate expected error code in the assert.writeError() calls:

https://github.com/mongodb/mongo/blob/7efbf73c48608675f3ce952429f59de2d1ba670f/jstests/readonly/write_ops.js#L12-L18

(not sure if integrations is the right team, but I put it as that since it's in the readonly suite)



 Comments   
Comment by Githook User [ 12/Dec/16 ]

Author:

{u'username': u'ksuarz', u'name': u'Kyle Suarez', u'email': u'kyle.suarez@mongodb.com'}

Message: SERVER-25904 include expected error code in read-only write ops test
Branch: master
https://github.com/mongodb/mongo/commit/57b9e3b61fa08b51743d13ab5f8275534ddcf3ba

Comment by Esha Maharishi (Inactive) [ 02/Sep/16 ]

We checked again, and the error code being returned actually is the expected one (not the --shardsvr one).

It would just be nice to add the error code check in case something else causes it to fail with a different code and incorrectly allows the test to pass.

Comment by Spencer Brody (Inactive) [ 02/Sep/16 ]

Currently the writes are failing because the shards aren't running with --shardsvr, not because they're in read-only mode. Once we fix the shards to be run with --shardsvr the writes should start failing for the expected reason, but we might have caught the misconfiguration with the shards earlier if these tests had been checking the code for the right failure mode.

Generated at Thu Feb 08 04:10:35 UTC 2024 using Jira 9.7.1#970001-sha1:2222b88b221c4928ef0de3161136cc90c8356a66.