154
154
# first check that it was not written yet.
155
155
# TODO: This requires taking a read lock while we are holding the above
156
156
# write lock, which shouldn't actually be possible
158
158
self.assertEqual(old_root, reference_tree.get_root_id())
159
159
# now unlock the second held lock, which should do nothing.
162
162
self.assertEqual(old_root, reference_tree.get_root_id())
163
163
# unlocking the first lock we took will now flush.
165
165
# and check it was written using another reference tree
167
167
self.assertEqual('new-root', reference_tree.get_root_id())
169
169
def test_unlock_from_tree_write_lock_flushes(self):