From a014251b5e3333cb75e676354ac4bcb346d16ac4 Mon Sep 17 00:00:00 2001 From: "Codex (gpt-6-astra)" Date: Wed, 9 Sep 2026 16:32:52 +0200 Subject: [PATCH] test: remove duplicate transaction lock tests --- src/spec/transaction/tests.rs | 56 ----------------------------------- 1 file changed, 56 deletions(-) diff --git a/src/spec/transaction/tests.rs b/src/spec/transaction/tests.rs index ecc415d..c2d806a 100644 --- a/src/spec/transaction/tests.rs +++ b/src/spec/transaction/tests.rs @@ -358,62 +358,6 @@ fn prepared_recovery_discards_staged_state() { assert_rolled_back(&fixture); } -#[test] -fn transaction_drop_releases_lock_with_a_duplicated_descriptor() { - let fixture = transaction_fixture(); - let transaction = acquire(&fixture.spec_root).unwrap(); - let Transaction { _lock: lock, .. } = &transaction; - let inherited_descriptor = lock.0.try_clone().unwrap(); - assert!( - acquire_error(&fixture) - .message() - .contains("another spec archive transaction") - ); - - drop(transaction); - - let recovered = acquire(&fixture.spec_root).unwrap(); - drop(inherited_descriptor); - assert!( - acquire_error(&fixture) - .message() - .contains("another spec archive transaction") - ); - drop(recovered); -} - -#[test] -fn incomplete_health_releases_lock_on_error_before_transaction() { - let fixture = transaction_fixture(); - let file = File::create(fixture.spec_root.base().join(LOCK_FILE)).unwrap(); - let inherited_descriptor = file.try_clone().unwrap(); - let lock = LockGuard::acquire(file).unwrap(); - assert!( - acquire_error(&fixture) - .message() - .contains("another spec archive transaction") - ); - let state_directory = fixture.spec_root.base().join(TRANSACTION_DIRECTORY); - - let result = incomplete_transaction_findings( - &fixture.spec_root, - fixture.spec_root.base().to_path_buf(), - state_directory.clone(), - state_directory.join(JOURNAL_FILE), - lock, - ); - - assert!(result.is_err()); - let recovered = acquire(&fixture.spec_root).unwrap(); - drop(inherited_descriptor); - assert!( - acquire_error(&fixture) - .message() - .contains("another spec archive transaction") - ); - drop(recovered); -} - #[test] fn committing_recovery_restores_originals() { let fixture = fail_at_phase(Phase::Committing);