From e748123a96c0ca36cc7b4f3b4984cb1a7bd7e774 Mon Sep 17 00:00:00 2001 From: Nikhil Benesch Date: Mon, 12 Jul 2021 16:18:20 -0400 Subject: [PATCH] materialized: account for changed semantics of JoinHandle::abort 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. --- src/materialized/tests/sql.rs | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/src/materialized/tests/sql.rs b/src/materialized/tests/sql.rs index f6e977ec6004..9fb6feb2070c 100644 --- a/src/materialized/tests/sql.rs +++ b/src/materialized/tests/sql.rs @@ -655,6 +655,10 @@ fn test_tail_shutdown() -> Result<(), Box> { // 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>(()) })?;