Skip to content

Commit

Permalink
Fix unsized error
Browse files Browse the repository at this point in the history
  • Loading branch information
stanislav-tkach committed Aug 6, 2020
1 parent 9b34398 commit 463a74a
Show file tree
Hide file tree
Showing 2 changed files with 12 additions and 14 deletions.
24 changes: 12 additions & 12 deletions tests/test_checkpoint.rs
Expand Up @@ -43,10 +43,10 @@ pub fn test_single_checkpoint() {
// Verify checkpoint
let cp = DB::open_default(&cp1_path).unwrap();

assert_eq!(*cp.get(b"k1").unwrap().unwrap(), *b"v1");
assert_eq!(*cp.get(b"k2").unwrap().unwrap(), *b"v2");
assert_eq!(*cp.get(b"k3").unwrap().unwrap(), *b"v3");
assert_eq!(*cp.get(b"k4").unwrap().unwrap(), *b"v4");
assert_eq!(cp.get(b"k1").unwrap().unwrap(), b"v1");
assert_eq!(cp.get(b"k2").unwrap().unwrap(), b"v2");
assert_eq!(cp.get(b"k3").unwrap().unwrap(), b"v3");
assert_eq!(cp.get(b"k4").unwrap().unwrap(), b"v4");
}

#[test]
Expand All @@ -73,10 +73,10 @@ pub fn test_multi_checkpoints() {
// Verify checkpoint
let cp = DB::open_default(&cp1_path).unwrap();

assert_eq!(*cp.get(b"k1").unwrap().unwrap(), *b"v1");
assert_eq!(*cp.get(b"k2").unwrap().unwrap(), *b"v2");
assert_eq!(*cp.get(b"k3").unwrap().unwrap(), *b"v3");
assert_eq!(*cp.get(b"k4").unwrap().unwrap(), *b"v4");
assert_eq!(cp.get(b"k1").unwrap().unwrap(), b"v1");
assert_eq!(cp.get(b"k2").unwrap().unwrap(), b"v2");
assert_eq!(cp.get(b"k3").unwrap().unwrap(), b"v3");
assert_eq!(cp.get(b"k4").unwrap().unwrap(), b"v4");

// Change some existing keys
db.put(b"k1", b"modified").unwrap();
Expand All @@ -94,8 +94,8 @@ pub fn test_multi_checkpoints() {
// Verify second checkpoint
let cp = DB::open_default(&cp2_path).unwrap();

assert_eq!(*cp.get(b"k1").unwrap().unwrap(), *b"modified");
assert_eq!(*cp.get(b"k2").unwrap().unwrap(), *b"changed");
assert_eq!(*cp.get(b"k5").unwrap().unwrap(), *b"v5");
assert_eq!(*cp.get(b"k6").unwrap().unwrap(), *b"v6");
assert_eq!(cp.get(b"k1").unwrap().unwrap(), b"modified");
assert_eq!(cp.get(b"k2").unwrap().unwrap(), b"changed");
assert_eq!(cp.get(b"k5").unwrap().unwrap(), b"v5");
assert_eq!(cp.get(b"k6").unwrap().unwrap(), b"v6");
}
2 changes: 0 additions & 2 deletions tests/test_multithreaded.rs
Expand Up @@ -16,8 +16,6 @@ mod util;

use std::{sync::Arc, thread};

use pretty_assertions::assert_eq;

use rocksdb::DB;
use util::DBPath;

Expand Down

0 comments on commit 463a74a

Please sign in to comment.