Skip to content

raft-runtime: pin into_result storage-over-phase precedence with a test row - #71

Open
chrischeng-c4 wants to merge 1 commit into
mainfrom
issue/49
Open

chrischeng-c4 wants to merge 1 commit into
mainfrom
issue/49

Conversation

@chrischeng-c4

Copy link
Copy Markdown
Contributor

Closes #49

Changes

  • Added report_into_result_prefers_storage_failure_over_incomplete_phase in crates/raft-runtime/tests/it/host_shutdown_deadline.rs next to report_into_result_returns_distinct_err_naming_phase_for_all_incomplete_phases.
  • Builds a HostShutdownReport literal with both storage_failure: Some(_) and incomplete_phase: Some(_), calls into_result(), and asserts that the resulting error renders the storage failure string rather than the incomplete phase error message.
  • Preserved existing rows without edits; zero modifications under crates/raft-runtime/src/.

Negative Control

  • Swapped the two if let branches in HostShutdownReport::into_result (crates/raft-runtime/src/application/host/shutdown_report.rs:60-67).
  • Verified compilation succeeded cleanly and host_shutdown_deadline::report_into_result_prefers_storage_failure_over_incomplete_phase failed (assertion 'left == right' failed: left: "raft: shutdown stopped early in phase Quiesce", right: "durable storage failed for node 1 on write_entry at /var/data/raft/wal: Other"), while report_into_result_returns_distinct_err_naming_phase_for_all_incomplete_phases passed.
  • Restored original branch ordering in shutdown_report.rs.

Local Validation Passed

  • Affected isolated unit test: cargo test --locked -p raft-runtime --test it host_shutdown_deadline::report_into_result_prefers_storage_failure_over_incomplete_phase -- --exact (1 passed, 0 failed).
  • Neighbor unit test: cargo test --locked -p raft-runtime --test it host_shutdown_deadline::report_into_result_returns_distinct_err_naming_phase_for_all_incomplete_phases -- --exact (1 passed, 0 failed).
  • Static formatting check: rustfmt --edition 2021 --check crates/raft-runtime/tests/it/host_shutdown_deadline.rs (passed).

Cloud MR Validation Required (Not Run Locally)

  • Cloud CI MR unit, functional, and e2e suites: PENDING current-head cloud CI.
  • Cluster/network/server tests in it binary (e.g. cluster timeouts, raft elections, server listeners): NOT RUN locally per test policy; delegated to authorized cloud CI.
  • Performance / regression acceptance gates: PENDING cloud CI.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

raft-runtime: pin into_result storage-over-phase precedence with a test row

1 participant