Remove mocks for reap method that was removed

This commit is contained in:
Alan Rominger 2022-07-27 11:53:09 -04:00
parent 6719010050
commit 7645cc2707
No known key found for this signature in database
GPG Key ID: C2D7EAAA12B63559

View File

@ -199,10 +199,7 @@ class TestAutoScaling:
assert len(self.pool) == 10
# cleanup should scale down to 8 workers
with mock.patch('awx.main.dispatch.reaper.reap') as reap:
with mock.patch('awx.main.dispatch.reaper.reap_waiting') as reap:
self.pool.cleanup()
reap.assert_called()
self.pool.cleanup()
assert len(self.pool) == 2
def test_max_scale_up(self):
@ -250,10 +247,7 @@ class TestAutoScaling:
time.sleep(1) # wait a moment for sigterm
# clean up and the dead worker
with mock.patch('awx.main.dispatch.reaper.reap') as reap:
with mock.patch('awx.main.dispatch.reaper.reap_waiting') as reap:
self.pool.cleanup()
reap.assert_called()
self.pool.cleanup()
assert len(self.pool) == 1
assert self.pool.workers[0].pid == alive_pid