From faab51ac353a4ea33eab791cfd8fbb52ad49e8c7 Mon Sep 17 00:00:00 2001 From: sonhmai <> Date: Mon, 10 Feb 2025 16:01:29 +0700 Subject: [PATCH] remove flaky pragma cli tests. Tests for similar behavior already covered in TCL and Rust connection api tests. So flaky problem in these is not worth exploring. We just removed them. --- tests/integration/mod.rs | 1 - tests/integration/pragma/mod.rs | 1 - tests/integration/pragma/test_pragma_stmts.rs | 40 ------------------- 3 files changed, 42 deletions(-) delete mode 100644 tests/integration/pragma/mod.rs delete mode 100644 tests/integration/pragma/test_pragma_stmts.rs diff --git a/tests/integration/mod.rs b/tests/integration/mod.rs index 9d29ef35c..5e99524ab 100644 --- a/tests/integration/mod.rs +++ b/tests/integration/mod.rs @@ -1,6 +1,5 @@ mod common; mod functions; mod fuzz; -mod pragma; mod query_processing; mod wal; diff --git a/tests/integration/pragma/mod.rs b/tests/integration/pragma/mod.rs deleted file mode 100644 index 1070d3011..000000000 --- a/tests/integration/pragma/mod.rs +++ /dev/null @@ -1 +0,0 @@ -mod test_pragma_stmts; diff --git a/tests/integration/pragma/test_pragma_stmts.rs b/tests/integration/pragma/test_pragma_stmts.rs deleted file mode 100644 index 11a831d37..000000000 --- a/tests/integration/pragma/test_pragma_stmts.rs +++ /dev/null @@ -1,40 +0,0 @@ -/// rexpect does not work on Windows. -/// https://github.com/rust-cli/rexpect/issues/11 -#[cfg(not(target_os = "windows"))] -mod tests { - use assert_cmd::cargo::cargo_bin; - use rexpect::error::*; - use rexpect::session::{spawn_command, PtySession}; - use std::process; - - #[test] - fn test_pragma_journal_mode_wal() -> Result<(), Error> { - let mut child = spawn_command(run_cli(), Some(1000))?; - child.exp_regex("limbo>")?; // skip everything until limbo cursor appear - child.exp_regex(".?")?; - child.send_line("pragma journal_mode;")?; - child.exp_string("wal")?; - quit(&mut child) - } - - #[test] - fn test_pragma_wal_checkpoint() -> Result<(), Error> { - let mut child = spawn_command(run_cli(), Some(1000))?; - child.exp_regex("limbo>")?; // skip everything until limbo cursor appear - child.exp_regex(".?")?; - child.send_line("pragma wal_checkpoint;")?; - child.exp_string("0|0|0")?; - quit(&mut child) - } - - fn quit(child: &mut PtySession) -> Result<(), Error> { - child.send_line(".quit")?; - child.exp_eof()?; - Ok(()) - } - - fn run_cli() -> process::Command { - let bin_path = cargo_bin("limbo"); - process::Command::new(bin_path) - } -}