Commit f277f519 authored by Vincent Pelletier's avatar Vincent Pelletier

Result order doesn't matter in partition-table-related database API.

git-svn-id: https://svn.erp5.org/repos/neo/trunk@2301 71dcc9de-d417-0410-9af5-da40c76e7ee4
parent aae93e23
...@@ -178,7 +178,7 @@ class StorageMySQSLdbTests(NeoTestBase): ...@@ -178,7 +178,7 @@ class StorageMySQSLdbTests(NeoTestBase):
cell2 = (1, uuid1, CellStates.UP_TO_DATE) cell2 = (1, uuid1, CellStates.UP_TO_DATE)
self.db.setPartitionTable(ptid, [cell1, cell2]) self.db.setPartitionTable(ptid, [cell1, cell2])
result = self.db.getPartitionTable() result = self.db.getPartitionTable()
self.assertEqual(result, [cell1, cell2]) self.assertEqual(set(result), set([cell1, cell2]))
def test_getLastOID(self): def test_getLastOID(self):
oid1 = self.getOID(1) oid1 = self.getOID(1)
...@@ -331,7 +331,7 @@ class StorageMySQSLdbTests(NeoTestBase): ...@@ -331,7 +331,7 @@ class StorageMySQSLdbTests(NeoTestBase):
# add more entries # add more entries
self.db.changePartitionTable(ptid, [cell2]) self.db.changePartitionTable(ptid, [cell2])
result = self.db.getPartitionTable() result = self.db.getPartitionTable()
self.assertEqual(result, [cell1, cell2]) self.assertEqual(set(result), set([cell1, cell2]))
# drop discarded cells # drop discarded cells
self.db.changePartitionTable(ptid, [cell2, cell3]) self.db.changePartitionTable(ptid, [cell2, cell3])
result = self.db.getPartitionTable() result = self.db.getPartitionTable()
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment