[SERVER-49969] Clear global state in VectorClockMongoDTestPrimary tearDown Created: 29/Jul/20 Updated: 29/Oct/23 Resolved: 29/Jul/20 |
|
| Status: | Closed |
| Project: | Core Server |
| Component/s: | Sharding |
| Affects Version/s: | None |
| Fix Version/s: | 4.7.0 |
| Type: | Bug | Priority: | Major - P3 |
| Reporter: | Pierlauro Sciarelli | Assignee: | Pierlauro Sciarelli |
| Resolution: | Fixed | Votes: | 0 |
| Labels: | None | ||
| Remaining Estimate: | Not Specified | ||
| Time Spent: | Not Specified | ||
| Original Estimate: | Not Specified | ||
| Backwards Compatibility: | Fully Compatible |
| Operating System: | ALL |
| Sprint: | Sharding 2020-08-10 |
| Participants: |
| Description |
|
In VectorClockMongoDTestPrimary setup the clusterRole is set to ShardServer and the replica set member state to primary. Such global state should be cleared in the tearDown because subsequent tests can depend on it. For instance, the gossipOut test is currently working "by hazard" because tests based on VectorClockMongoDTest fixture are always executed before VectorClockMongoDTestPrimary ones. Changing such order - e.g. by changing fixtures alphabetical order - would cause the test to break because the result depends on clusterRole. PS: this ticket is probably a good reason to push for a randomization of unit tests order. |
| Comments |
| Comment by Githook User [ 29/Jul/20 ] |
|
Author: {'name': 'Pierlauro Sciarelli', 'email': 'pierlauro.sciarelli@mongodb.com', 'username': 'pierlauro'}Message: |