From 4aff40fff8ea5857a3b677b79fde7df3cf9afc7b Mon Sep 17 00:00:00 2001 From: Florian Klink Date: Sun, 5 May 2024 18:19:11 +0300 Subject: fix(tvix/castore/import): assert end of stream Once we break out with the root node, there may be no more elements in the stream. Change-Id: I6f5fc5662095aa2b2a56bcad506d25520d9ad00c Reviewed-on: https://cl.tvl.fyi/c/depot/+/11592 Reviewed-by: Connor Brewster Tested-by: BuildkiteCI Autosubmit: flokli --- tvix/castore/src/import/mod.rs | 5 +++++ 1 file changed, 5 insertions(+) (limited to 'tvix') diff --git a/tvix/castore/src/import/mod.rs b/tvix/castore/src/import/mod.rs index 87e289911300..05a21c9df818 100644 --- a/tvix/castore/src/import/mod.rs +++ b/tvix/castore/src/import/mod.rs @@ -134,6 +134,11 @@ where } }; + assert!( + entries.count().await == 0, + "Tvix bug: left over elements in the stream" + ); + assert!( directories.is_empty(), "Tvix bug: left over directories after processing ingestion stream" -- cgit 1.4.1