Merge "Fix timing test error when rebalancing"
This commit is contained in:
commit
2ffad93226
@ -1889,9 +1889,9 @@ class TestCommands(unittest.TestCase, RunSwiftRingBuilderMixin):
|
|||||||
|
|
||||||
def test_time_remaining(self):
|
def test_time_remaining(self):
|
||||||
self.create_sample_ring()
|
self.create_sample_ring()
|
||||||
self.run_srb('rebalance')
|
|
||||||
now = time.time()
|
now = time.time()
|
||||||
with mock.patch('swift.common.ring.builder.time', return_value=now):
|
with mock.patch('swift.common.ring.builder.time', return_value=now):
|
||||||
|
self.run_srb('rebalance')
|
||||||
out, err = self.run_srb('rebalance')
|
out, err = self.run_srb('rebalance')
|
||||||
self.assertIn('No partitions could be reassigned', out)
|
self.assertIn('No partitions could be reassigned', out)
|
||||||
self.assertIn('must be at least min_part_hours', out)
|
self.assertIn('must be at least min_part_hours', out)
|
||||||
|
Loading…
Reference in New Issue
Block a user