Skip to content

Commit 851495c

Browse files
committed
use insta for sync reader
1 parent 8bf2c92 commit 851495c

File tree

3 files changed

+196
-195
lines changed

3 files changed

+196
-195
lines changed

parquet/Cargo.toml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -78,6 +78,7 @@ base64 = { version = "0.22", default-features = false, features = ["std"] }
7878
criterion = { version = "0.5", default-features = false, features = ["async_futures"] }
7979
snap = { version = "1.0", default-features = false }
8080
tempfile = { version = "3.0", default-features = false }
81+
insta = "1.43.1"
8182
brotli = { version = "8.0", default-features = false, features = ["std"] }
8283
flate2 = { version = "1.0", default-features = false, features = ["rust_backend"] }
8384
lz4_flex = { version = "0.11", default-features = false, features = ["std", "frame"] }

parquet/tests/arrow_reader/io/mod.rs

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -690,6 +690,17 @@ impl OperationLog {
690690
}
691691
}
692692

693+
/// return a snapshot of the current operations in the log.
694+
fn snapshot(&self) -> Vec<String> {
695+
self.coalesce_entries();
696+
let ops = self.ops.lock().unwrap();
697+
let mut actual = vec![];
698+
let indent = 0;
699+
ops.iter()
700+
.for_each(|s| s.append_string(&mut actual, indent));
701+
actual
702+
}
703+
693704
/// Assert that the operations in the log match the expected operations
694705
/// with an error message that can be copy/pasted to update a test on failure.
695706
fn assert<'a>(&self, expected: impl IntoIterator<Item = &'a str>) {

0 commit comments

Comments
 (0)