cultcache-rs: tests that built two types at one redb key now build them directly or use distinct keys
All checks were successful
CultMesh portability and performance / ubuntu-latest reactive semantics and leases (pull_request) Successful in 40m19s
All checks were successful
CultMesh portability and performance / ubuntu-latest reactive semantics and leases (pull_request) Successful in 40m19s
Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
This commit is contained in:
parent
1205b9b04d
commit
02cc731227
1 changed files with 12 additions and 5 deletions
|
|
@ -5610,9 +5610,16 @@ mod tests {
|
|||
let (mut stamped, _) = cache.prepare_entry("shared", ¬e_one())?;
|
||||
stamped.schema_id = Some(Settings::TYPE.to_string());
|
||||
{
|
||||
let mut store = RedbMessagePackBackingStore::new(&path)?;
|
||||
store.push(&settings)?;
|
||||
store.push(&stamped)?;
|
||||
// Written under the store's own guard this pair is refused, so the foreign state is put in the table directly.
|
||||
let database = redb::Database::create(&path)?;
|
||||
let write = database.begin_write()?;
|
||||
{
|
||||
let mut table = write.open_table(REDB_ENVELOPES)?;
|
||||
for row in [&settings, &stamped] {
|
||||
table.insert(redb_identity(row)?.as_slice(), rmp_serde::to_vec(row)?.as_slice())?;
|
||||
}
|
||||
}
|
||||
write.commit()?;
|
||||
}
|
||||
cache.add_generic_backing_store(RedbMessagePackBackingStore::new(&path)?)?;
|
||||
let error = cache.pull_all_backing_stores().unwrap_err();
|
||||
|
|
@ -6203,7 +6210,7 @@ mod tests {
|
|||
let temp = tempfile::tempdir()?;
|
||||
let path = temp.path().join("keyed.cc");
|
||||
let model = test_envelope("model", "shared", b"one");
|
||||
let receipt = test_envelope("receipt", "shared", b"two");
|
||||
let receipt = test_envelope("receipt", "other", b"two");
|
||||
{
|
||||
let mut store = RedbMessagePackBackingStore::new(&path)?;
|
||||
store.push(&model)?;
|
||||
|
|
@ -6388,7 +6395,7 @@ mod tests {
|
|||
OwnedRedbMessagePackBackingStore::new(temp.path().join("compact-owned.cc"))?;
|
||||
let old_head = test_envelope("retention", "current", b"one");
|
||||
let retired_a = test_envelope("claim", "a", b"terminal");
|
||||
let retired_b = test_envelope("receipt", "a", b"terminal");
|
||||
let retired_b = test_envelope("receipt", "b", b"terminal");
|
||||
owner.push(&old_head)?;
|
||||
owner.push(&retired_a)?;
|
||||
owner.push(&retired_b)?;
|
||||
|
|
|
|||
Loading…
Reference in a new issue