Skip to content

Commit

Permalink
Remove mocks for reap method that was removed
Browse files Browse the repository at this point in the history
  • Loading branch information
AlanCoding committed Aug 17, 2022
1 parent 6719010 commit 7645cc2
Showing 1 changed file with 2 additions and 8 deletions.
10 changes: 2 additions & 8 deletions awx/main/tests/functional/test_dispatch.py
Original file line number Diff line number Diff line change
Expand Up @@ -199,10 +199,7 @@ def test_scale_down(self):
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):
Expand Down Expand Up @@ -250,10 +247,7 @@ def test_lost_worker_autoscale(self):
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

Expand Down

0 comments on commit 7645cc2

Please sign in to comment.