Skip to content

Commit

Permalink
materialized: account for changed semantics of JoinHandle::abort
Browse files Browse the repository at this point in the history
tokio-rs/tokio#3934 changed the semantics of JoinHandle::abort such that
you have to await the underlying task to actually deliver the abort. Do
so, to fix a stall in `test_tail_shutdown` caused by the connection not
actually getting aborted.
  • Loading branch information
benesch authored and aljoscha committed Jul 21, 2021
1 parent 0318864 commit 83dc9e0
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions src/materialized/tests/sql.rs
Expand Up @@ -655,6 +655,10 @@ fn test_tail_shutdown() -> Result<(), Box<dyn Error>> {
// Un-gracefully abort the connection.
conn_task.abort();

// Need to await `conn_task` to actually deliver the `abort`. We don't
// care about the result though (it's probably `JoinError::Cancelled`).
let _ = conn_task.await;

Ok::<_, Box<dyn Error>>(())
})?;

Expand Down

0 comments on commit 83dc9e0

Please sign in to comment.