Skip to content

Commit

Permalink
Fix the multi-env test
Browse files Browse the repository at this point in the history
  • Loading branch information
Kerollmops committed Dec 24, 2022
1 parent ff265b2 commit 4571b88
Showing 1 changed file with 8 additions and 8 deletions.
16 changes: 8 additions & 8 deletions heed/examples/multi-env.rs
Original file line number Diff line number Diff line change
Expand Up @@ -21,19 +21,19 @@ fn main() -> Result<(), Box<dyn Error>> {
.max_dbs(3000)
.open(env2_path)?;

let mut wtxn = env1.write_txn()?;
let db1: Database<Str, ByteSlice> = env1.create_database(&mut wtxn, Some("hello"))?;
let mut wtxn1 = env1.write_txn()?;
let mut wtxn2 = env2.write_txn()?;
let db1: Database<Str, ByteSlice> = env1.create_database(&mut wtxn1, Some("hello"))?;
let db2: Database<OwnedType<u32>, OwnedType<u32>> =
env2.create_database(&mut wtxn, Some("hello"))?;
env2.create_database(&mut wtxn2, Some("hello"))?;

// clear db
db1.clear(&mut wtxn)?;
wtxn.commit()?;
db1.clear(&mut wtxn1)?;
wtxn1.commit()?;

// clear db
let mut wtxn = env2.write_txn()?;
db2.clear(&mut wtxn)?;
wtxn.commit()?;
db2.clear(&mut wtxn2)?;
wtxn2.commit()?;

// -----

Expand Down

0 comments on commit 4571b88

Please sign in to comment.