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

Function test_post_commit

crates/engine/src/relational_db.rs:2888–2901  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

2886
2887 #[test]
2888 fn test_post_commit() -> ResultTest<()> {
2889 let stdb = TestDB::durable()?;
2890
2891 let mut tx = begin_mut_tx(&stdb);
2892
2893 let table_id = stdb.create_table(&mut tx, my_table(AlgebraicType::I32))?;
2894
2895 insert_three_i32s(&stdb, &mut tx, table_id)?;
2896 stdb.commit_tx(tx)?;
2897
2898 let tx = begin_mut_tx(&stdb);
2899 assert_eq!(collect_sorted::<i32>(&stdb, &tx, table_id)?, vec![-1, 0, 1]);
2900 Ok(())
2901 }
2902
2903 #[test]
2904 fn test_filter_range_pre_commit() -> ResultTest<()> {

Callers

nothing calls this directly

Calls 6

my_tableFunction · 0.85
insert_three_i32sFunction · 0.85
commit_txMethod · 0.80
begin_mut_txFunction · 0.70
OkFunction · 0.50
create_tableMethod · 0.45

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…