[SERVER-20899] CleanEveryN hook isn't compatible with ReplicaSetFixture and ShardedClusterFixture Created: 13/Oct/15  Updated: 18/Dec/15  Resolved: 15/Oct/15

Status: Closed
Project: Core Server
Component/s: Testing Infrastructure
Affects Version/s: 3.1.9
Fix Version/s: 3.2.0-rc1

Type: Bug Priority: Major - P3
Reporter: Max Hirschhorn Assignee: Max Hirschhorn
Resolution: Done Votes: 0
Labels: None
Remaining Estimate: Not Specified
Time Spent: Not Specified
Original Estimate: Not Specified

Issue Links:
Related
related to SERVER-21955 CleanEveryN hook isn't compatible wit... Closed
Backwards Compatibility: Fully Compatible
Operating System: ALL
Sprint: QuInt B (11/02/15)
Participants:

 Description   

ReplicaSetFixture.setup() creates and appends new MongoDFixture instances each time it gets called.

ShardedClusterFixture.setup() creates and appends new MongodFixture instances for the shards each time it gets called.

Instead, the fixtures used internally should only be constructed once, and then calls to setup() and teardown() will just to the right thing when restarting the ReplicaSetFixture and ShardedClusterFixture.

Note that the port attribute is only set after MongoDFixture.setup() is called, which is why all of this initialization cannot happen in the constructor. Prior to SERVER-18273, this was useful to shrink the delay between when a port was acquire from OS and when it was handed off to the mongod process for use. However, now that resmoke.py assumes the availability of a contiguous range of ports, this technically isn't necessary, but also isn't a priority to change at present.



 Comments   
Comment by Githook User [ 15/Oct/15 ]

Author:

{u'username': u'visemet', u'name': u'Max Hirschhorn', u'email': u'max.hirschhorn@mongodb.com'}

Message: SERVER-20899 Fix issue with resmoke.py fixtures and CleanEveryN hook.

Avoid constructing new Fixture instances inside
ReplicaSetFixture.setup() and ShardedClusterFixture.setup().
Branch: master
https://github.com/mongodb/mongo/commit/06fcd7530230075f1b4afffa2164911913c59538

Generated at Thu Feb 08 03:55:38 UTC 2024 using Jira 9.7.1#970001-sha1:2222b88b221c4928ef0de3161136cc90c8356a66.