Skip to content

Commit dc3596f

Browse files
committed
fix tests
1 parent 55f4d56 commit dc3596f

File tree

1 file changed

+5
-3
lines changed

1 file changed

+5
-3
lines changed

server/state_store/src/in_memory_state.rs

+5-3
Original file line numberDiff line numberDiff line change
@@ -328,9 +328,11 @@ impl InMemoryState {
328328

329329
pub fn active_tasks_for_executor(&self, executor_id: &str) -> Vec<Box<Task>> {
330330
let mut tasks = vec![];
331-
for (_, allocations) in self.allocations_by_fn.get(executor_id).unwrap() {
332-
for allocation in allocations {
333-
tasks.push(self.tasks.get(&allocation.task_key()).unwrap().clone());
331+
if let Some(allocations_by_fn) = self.allocations_by_fn.get(executor_id) {
332+
for allocations in allocations_by_fn.values() {
333+
for allocation in allocations {
334+
tasks.push(self.tasks.get(&allocation.task_key()).unwrap().clone());
335+
}
334336
}
335337
}
336338
tasks

0 commit comments

Comments
 (0)