Skip to content

Commit b9a0686

Browse files
committed
test(driver): poll with timeout
1 parent 3616150 commit b9a0686

1 file changed

Lines changed: 9 additions & 1 deletion

File tree

compio-driver/tests/op.rs

Lines changed: 9 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -124,7 +124,15 @@ fn push_and_wait_multi<O: OpCode + 'static>(
124124
}
125125
}
126126

127-
driver.poll(None).unwrap();
127+
match driver.poll(Some(Duration::from_millis(100))) {
128+
Ok(()) => {}
129+
Err(e)
130+
if matches!(
131+
e.kind(),
132+
io::ErrorKind::TimedOut | io::ErrorKind::Interrupted
133+
) => {}
134+
Err(e) => panic!("{e:?}"),
135+
}
128136
}
129137
})
130138
}

0 commit comments

Comments
 (0)