Skip to content

Commit

Permalink
storage: use goldenscripts for MVCC tests
Browse files Browse the repository at this point in the history
  • Loading branch information
erikgrinaker committed Jun 13, 2024
1 parent 638a175 commit 75eaf7c
Show file tree
Hide file tree
Showing 50 changed files with 1,481 additions and 2,473 deletions.
1 change: 1 addition & 0 deletions src/raft/log.rs
Original file line number Diff line number Diff line change
Expand Up @@ -365,6 +365,7 @@ mod tests {
impl goldenscript::Runner for TestRunner {
fn run(&mut self, command: &goldenscript::Command) -> Result<String, Box<dyn Error>> {
let mut output = String::new();
// TODO: use [ops] tag instead of oplog= parameters. See MVCC runner.
match command.name.as_str() {
// append [COMMAND] [oplog=BOOL]
"append" => {
Expand Down
4 changes: 2 additions & 2 deletions src/storage/engine.rs
Original file line number Diff line number Diff line change
Expand Up @@ -207,7 +207,7 @@ pub mod test {
format!(
"{} → {}",
Self::format_bytes(key),
value.map(|v| Self::format_bytes(v)).unwrap_or("None".to_string())
value.map(Self::format_bytes).unwrap_or("None".to_string())
)
}

Expand Down Expand Up @@ -300,7 +300,7 @@ pub mod test {
/// panicking if they produce different results. Engine implementations
/// should not have any observable differences in behavior.
///
/// TODO: use this in more tests, e.g. MVCC tests.
/// TODO: use this in more tests, e.g. SQL tests.
pub struct Mirror<A: Engine, B: Engine> {
pub a: A,
pub b: B,
Expand Down
22 changes: 0 additions & 22 deletions src/storage/golden/mvcc/anomaly_dirty_read

This file was deleted.

22 changes: 0 additions & 22 deletions src/storage/golden/mvcc/anomaly_dirty_write

This file was deleted.

31 changes: 0 additions & 31 deletions src/storage/golden/mvcc/anomaly_fuzzy_read

This file was deleted.

33 changes: 0 additions & 33 deletions src/storage/golden/mvcc/anomaly_lost_update

This file was deleted.

45 changes: 0 additions & 45 deletions src/storage/golden/mvcc/anomaly_phantom_read

This file was deleted.

39 changes: 0 additions & 39 deletions src/storage/golden/mvcc/anomaly_read_skew

This file was deleted.

41 changes: 0 additions & 41 deletions src/storage/golden/mvcc/anomaly_write_skew

This file was deleted.

30 changes: 0 additions & 30 deletions src/storage/golden/mvcc/begin

This file was deleted.

89 changes: 0 additions & 89 deletions src/storage/golden/mvcc/begin_as_of

This file was deleted.

0 comments on commit 75eaf7c

Please sign in to comment.