From 35d70f94b7363cb1c85fe887233befe4c3fe0dd7 Mon Sep 17 00:00:00 2001 From: Florian Klink Date: Mon, 8 Apr 2024 17:40:59 +0300 Subject: fix(tvix/nix-compat/wire): fix BytesWriter test payloads We actually did construct other payload sizes than the test function was intended to, because I'm too stupid to count. Fix that, and also update a leftover _debug in a test name. Change-Id: I1bff8551f2078afe82f789646b851f2fcff3e82c Reviewed-on: https://cl.tvl.fyi/c/depot/+/11381 Reviewed-by: picnoir picnoir Autosubmit: flokli Tested-by: BuildkiteCI --- tvix/nix-compat/src/wire/bytes_writer.rs | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) (limited to 'tvix/nix-compat/src') diff --git a/tvix/nix-compat/src/wire/bytes_writer.rs b/tvix/nix-compat/src/wire/bytes_writer.rs index 15cac91401c5..6affc092cc83 100644 --- a/tvix/nix-compat/src/wire/bytes_writer.rs +++ b/tvix/nix-compat/src/wire/bytes_writer.rs @@ -308,7 +308,7 @@ mod tests { /// Write a 8 bytes payload (no padding) #[tokio::test] async fn write_8b() { - let payload = &hex!("000102030405060708"); + let payload = &hex!("0001020304050607"); let mut mock = Builder::new() .write(&produce_exp_bytes(payload).await) @@ -322,7 +322,7 @@ mod tests { /// Write a 9 bytes payload (7 bytes padding) #[tokio::test] async fn write_9b() { - let payload = &hex!("00010203040506070809"); + let payload = &hex!("000102030405060708"); let mut mock = Builder::new() .write(&produce_exp_bytes(payload).await) @@ -337,7 +337,7 @@ mod tests { /// and a shutdown at the end. #[tokio::test] async fn write_9b_flush() { - let payload = &hex!("00010203040506070809"); + let payload = &hex!("000102030405060708"); let exp_bytes = produce_exp_bytes(payload).await; let mut mock = Builder::new().write(&exp_bytes).build(); @@ -359,7 +359,7 @@ mod tests { /// Write a larger bytes packet #[tokio::test] - async fn write_1m_debug() { + async fn write_1m() { let payload = LARGE_PAYLOAD.as_slice(); let exp_bytes = produce_exp_bytes(payload).await; -- cgit 1.4.1