Fix test macro that caused test runs to fail

With upstream changes to Tokio, the API for `Shutdown<'_, T>` as defined
by the `AsyncWriteExt` trait has changed. This change requires us to
await the function and then handle the result.
The macro definition was changed as a consequence.

Signed-off-by: Sayan Nandan <nandansayan@outlook.com>
next
Sayan Nandan 4 years ago
parent 4915121ce8
commit 3f5848d49a
No known key found for this signature in database
GPG Key ID: C31EFD7DDA12AEE0

4
Cargo.lock generated

@ -373,9 +373,9 @@ dependencies = [
[[package]]
name = "rand"
version = "0.8.0"
version = "0.8.1"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "a76330fb486679b4ace3670f117bbc9e16204005c4bde9c4bd372f45bed34f12"
checksum = "c24fcd450d3fa2b592732565aa4f17a27a61c65ece4726353e000939b0edee34"
dependencies = [
"libc",
"rand_chacha",

@ -67,7 +67,7 @@ fn parse_dbtest(mut input: syn::ItemFn, rand: u16) -> Result<TokenStream, syn::E
let addr = crate::tests::start_test_server(#rand, Some(asyncdb.clone())).await;
let mut stream = tokio::net::TcpStream::connect(&addr).await.unwrap();
#body
stream.shutdown(::std::net::Shutdown::Write);
stream.shutdown().await.unwrap();
asyncdb.finish_db();
drop(asyncdb);
};

Loading…
Cancel
Save