launchpad-reviewers team mailing list archive
-
launchpad-reviewers team
-
Mailing list archive
-
Message #12512
Re: [Merge] lp:~rvb/maas/ensure-master-takes-first into lp:maas
I don't get the impression that test_ensure_master_returns_oldest_nodegroup is quite enough to cover the "return the oldest one" functionality. Whether ensure_master does the right thing doesn't really become obvious until you test with two nodegroups present, with different timestamps.
It takes a bit of tweaking to get different timestamps with certainty, because the database transaction clock doesn't advance during the test (and even if it did, because things may happen within the clock's granularity). What I usually do when faced with this problem is create two objects as normal, but subtract a fixed timedelta from the first one's timestamp.
--
https://code.launchpad.net/~rvb/maas/ensure-master-takes-first/+merge/126498
Your team Launchpad code reviewers is requested to review the proposed merge of lp:~rvb/maas/ensure-master-takes-first into lp:maas.
Follow ups
References