Skip to content

Commit

Permalink
fix CI
Browse files Browse the repository at this point in the history
  • Loading branch information
crusaderky committed Mar 9, 2022
1 parent ee5ca53 commit d948828
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions distributed/tests/test_worker_memory.py
Original file line number Diff line number Diff line change
Expand Up @@ -542,18 +542,18 @@ async def test_override_data_nanny(c, s, n):
config={"distributed.worker.memory.monitor-interval.spill-pause": "10ms"},
)
async def test_override_data_vs_memory_monitor(c, s, a):
a.monitor.get_process_memory = lambda: 801_000_000 if a.data else 0
assert memory_monitor_running(a)

# Push a key that would normally trip both the target and the spill thresholds
class C:
def __sizeof__(self):
return 1_000_000_000
return 801_000_000

# Capture output of log_errors()
with captured_logger(logging.getLogger("distributed.utils")) as logger:
x = c.submit(C)
await wait(x)
a.monitor.get_process_memory = lambda: 1_000_000_000

# The pause subsystem of the memory monitor has been tripped.
# The spill subsystem hasn't.
Expand Down

0 comments on commit d948828

Please sign in to comment.