MCPcopy Create free account
hub / github.com/clockworklabs/SpacetimeDB / copy_all

Function copy_all

crates/commitlog/tests/streaming/mod.rs:30–51  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

28
29#[tokio::test]
30async fn copy_all() {
31 enable_logging();
32
33 let root = tempdir().unwrap();
34 let (src, dst) = create_dirs(root.path()).await;
35 fill_log(src.clone()).await;
36
37 let writer = create_writer(dst.clone())
38 .await
39 .expect("failed to create stream writer");
40 let reader = create_reader(&src, ..);
41 pin!(reader);
42 writer
43 .append_all(reader, |_| ())
44 .await
45 .unwrap()
46 .sync_all()
47 .await
48 .unwrap();
49
50 assert_equal_dirs(&src, &dst).await
51}
52
53#[tokio::test]
54async fn copy_ranges() {

Callers

nothing calls this directly

Calls 11

create_dirsFunction · 0.85
create_writerFunction · 0.85
create_readerFunction · 0.85
assert_equal_dirsFunction · 0.85
append_allMethod · 0.80
fill_logFunction · 0.70
enable_loggingFunction · 0.50
unwrapMethod · 0.45
pathMethod · 0.45
cloneMethod · 0.45
sync_allMethod · 0.45

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…