(
mode: &'static str,
description: &'static str,
run: impl FnOnce() -> Result<Vec<PreparedUpdateTest>>,
)
| 2674 | } |
| 2675 | |
| 2676 | fn pglite_prepared_update_run( |
| 2677 | mode: &'static str, |
| 2678 | description: &'static str, |
| 2679 | run: impl FnOnce() -> Result<Vec<PreparedUpdateTest>>, |
| 2680 | ) -> Result<PreparedUpdateRun> { |
| 2681 | reset_protocol_stats(); |
| 2682 | let tests = match run() { |
| 2683 | Ok(tests) => tests, |
| 2684 | Err(err) => { |
| 2685 | disable_protocol_stats(); |
| 2686 | return Err(err); |
| 2687 | } |
| 2688 | }; |
| 2689 | let protocol_stats = Some(protocol_stats_snapshot()); |
| 2690 | disable_protocol_stats(); |
| 2691 | Ok(PreparedUpdateRun { |
| 2692 | mode, |
| 2693 | description, |
| 2694 | protocol_stats, |
| 2695 | tests, |
| 2696 | }) |
| 2697 | } |
| 2698 | |
| 2699 | fn validate_prepared_update_gate(report: &PreparedUpdateReport) -> Result<()> { |
| 2700 | let scale = report.rows as f64 / 25_000_f64; |
no test coverage detected