fix non-determinism bug arising from a call to thread_rng while picking

which row to check existence for in the result of the select query
This commit is contained in:
alpaylan
2025-01-13 17:26:23 +03:00
parent c3ea02783d
commit fb937eff7b
3 changed files with 13 additions and 6 deletions

View File

@@ -218,7 +218,7 @@ fn main() -> Result<(), String> {
last_execution,
);
match (shrunk, &result) {
match (&shrunk, &result) {
(
SandboxedResult::Panicked { error: e1, .. },
SandboxedResult::Panicked { error: e2, .. },
@@ -227,7 +227,7 @@ fn main() -> Result<(), String> {
SandboxedResult::FoundBug { error: e1, .. },
SandboxedResult::FoundBug { error: e2, .. },
) => {
if &e1 != e2 {
if e1 != e2 {
log::error!(
"shrinking failed, the error was not properly reproduced"
);
@@ -291,6 +291,7 @@ fn revert_db_and_plan_files(output_dir: &Path) {
std::fs::rename(&new_plan_path, &old_plan_path).unwrap();
}
#[derive(Debug)]
enum SandboxedResult {
Panicked {
error: String,