Commit fda2b44
committed
test(benchmarks-website): adopt Result<()> + ? in tests, drop unwraps
CLAUDE.md asks tests to return `Result<()>` and use `?` instead of
`unwrap`. Two test functions and one helper still leaned on
`unwrap()`:
- `migrate::tests::flush_all_does_not_overcount_on_failure` plus its
`open_db_without` helper.
- `classifier::tests::random_access_bins_dataset_pattern`.
- `read_routes_serve_after_ingest` in
`vortex-bench-server/tests/ingest.rs`.
The `axum::serve(listener, app).await.unwrap()` calls inside the
spawned background-server closures stay — they're inside
`tokio::spawn`'s unit-returning future, so `?` cannot propagate, and
panicking on a setup failure is the right shape there.
`cargo test -p vortex-bench-server -p vortex-bench-migrate` is green;
no snapshot rewrites needed.
Signed-off-by: Claude <noreply@anthropic.com>1 parent 573c6b3 commit fda2b44
3 files changed
Lines changed: 21 additions & 10 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
793 | 793 | | |
794 | 794 | | |
795 | 795 | | |
| 796 | + | |
| 797 | + | |
796 | 798 | | |
797 | 799 | | |
798 | 800 | | |
| |||
836 | 838 | | |
837 | 839 | | |
838 | 840 | | |
839 | | - | |
840 | | - | |
| 841 | + | |
| 842 | + | |
| 843 | + | |
841 | 844 | | |
842 | 845 | | |
843 | 846 | | |
844 | 847 | | |
845 | 848 | | |
846 | 849 | | |
847 | 850 | | |
| 851 | + | |
848 | 852 | | |
849 | 853 | | |
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
869 | 869 | | |
870 | 870 | | |
871 | 871 | | |
872 | | - | |
873 | | - | |
| 872 | + | |
| 873 | + | |
874 | 874 | | |
875 | | - | |
876 | | - | |
877 | | - | |
| 875 | + | |
| 876 | + | |
| 877 | + | |
878 | 878 | | |
879 | 879 | | |
880 | 880 | | |
| |||
898 | 898 | | |
899 | 899 | | |
900 | 900 | | |
901 | | - | |
| 901 | + | |
902 | 902 | | |
903 | 903 | | |
904 | 904 | | |
905 | 905 | | |
906 | | - | |
| 906 | + | |
907 | 907 | | |
908 | 908 | | |
909 | 909 | | |
| |||
931 | 931 | | |
932 | 932 | | |
933 | 933 | | |
| 934 | + | |
934 | 935 | | |
935 | 936 | | |
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
283 | 283 | | |
284 | 284 | | |
285 | 285 | | |
286 | | - | |
| 286 | + | |
| 287 | + | |
| 288 | + | |
| 289 | + | |
| 290 | + | |
| 291 | + | |
| 292 | + | |
287 | 293 | | |
288 | 294 | | |
289 | 295 | | |
| |||
0 commit comments