(
#[case] snapshot_name: &str,
#[case] top_memory_consumers: impl IntoIterator<Item = &'a str>,
)
| 213 | #[case("top3_default", [])] |
| 214 | #[test] |
| 215 | fn test_cli_top_memory_consumers<'a>( |
| 216 | #[case] snapshot_name: &str, |
| 217 | #[case] top_memory_consumers: impl IntoIterator<Item = &'a str>, |
| 218 | ) { |
| 219 | let _bound = bind_to_settings(snapshot_name); |
| 220 | |
| 221 | let mut cmd = cli(); |
| 222 | let sql = "select * from generate_series(1,500000) as t1(v1) order by v1 desc;"; |
| 223 | cmd.args(["--memory-limit", "10M", "--command", sql]); |
| 224 | cmd.args(top_memory_consumers); |
| 225 | |
| 226 | assert_cmd_snapshot!(cmd); |
| 227 | } |
| 228 | |
| 229 | #[rstest] |
| 230 | #[case("no_track", ["--top-memory-consumers", "0"])] |
nothing calls this directly
no test coverage detected
searching dependent graphs…