Skip to content

Commit

Permalink
Update a few tests for speculative assignment
Browse files Browse the repository at this point in the history
  • Loading branch information
gforsyth committed Nov 24, 2020
1 parent b3b19c0 commit 2e1b5e6
Show file tree
Hide file tree
Showing 2 changed files with 17 additions and 2 deletions.
9 changes: 8 additions & 1 deletion distributed/diagnostics/progress.py
Original file line number Diff line number Diff line change
Expand Up @@ -311,7 +311,14 @@ def __init__(self, scheduler):
def create(self, key, k):
with log_errors():
ts = self.scheduler.tasks[key]
g = {"memory": 0, "erred": 0, "waiting": 0, "released": 0, "processing": 0}
g = {
"memory": 0,
"erred": 0,
"waiting": 0,
"released": 0,
"processing": 0,
"speculative": 0,
}
self.keys[k] = set()
self.groups[k] = g
self.nbytes[k] = 0
Expand Down
10 changes: 9 additions & 1 deletion distributed/http/scheduler/tests/test_scheduler_http.py
Original file line number Diff line number Diff line change
Expand Up @@ -126,7 +126,15 @@ async def fetch_metrics():
]
return active_metrics, forgotten_tasks

expected = {"memory", "released", "processing", "waiting", "no-worker", "erred"}
expected = {
"memory",
"released",
"processing",
"waiting",
"no-worker",
"erred",
"speculative",
}

# Ensure that we get full zero metrics for all states even though the
# scheduler did nothing, yet
Expand Down

0 comments on commit 2e1b5e6

Please sign in to comment.