On Wednesday 26 September 2012 18:50:30 you wrote: > > 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. > > Arg, you're right! I forgot about that. > > This is fixed now, thanks.
Can't you get the oldest by ID? -- 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. _______________________________________________ Mailing list: https://launchpad.net/~launchpad-reviewers Post to : [email protected] Unsubscribe : https://launchpad.net/~launchpad-reviewers More help : https://help.launchpad.net/ListHelp

