Testing: IP allocation simulation - fix nondeterminism in do_something_random().
authorMartin Schwenke <martin@meltin.net>
Mon, 2 Aug 2010 04:24:00 +0000 (14:24 +1000)
committerMartin Schwenke <martin@meltin.net>
Mon, 2 Aug 2010 04:24:00 +0000 (14:24 +1000)
commita01244499dc3567f5aa934b1864b9bc183a6c242
treeaeb448d3c7784841480b8ed757323a803b618035
parenta32298e7bc819694518e859f100f9444ff5663cd
Testing: IP allocation simulation - fix nondeterminism in do_something_random().

The current code makes random choices from unsorted lists.  This
ensures the lists are sorted.

Also, make the code easier to read by doing the random selction from
lists of PNNs rather than lists of Node objects.

Signed-off-by: Martin Schwenke <martin@meltin.net>
tests/takeover/ctdb_takeover.py