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 Jan 11, 2023
1 parent a1ed4b1 commit 9db1ebc
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 9db1ebc

Please sign in to comment.