Skip to content

Commit 673fdb9

Browse files
authored
1 parent 72277f8 commit 673fdb9

28 files changed

Lines changed: 268 additions & 41 deletions

File tree

doc/developer/testdrive.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -658,7 +658,7 @@ INSERT INTO test_table VALUES (1, 'Alice'), (2, 'Bob');
658658

659659
#### `$ duckdb-query name=... [sort-rows=true]`
660660

661-
Executes a query against a named DuckDB connection and verifies the output. The first line of the command body is the SQL query. The remaining lines are the expected output, with columns separated by spaces.
661+
Executes a query against a named DuckDB connection and verifies the output. The first line of the command body is the SQL query. The remaining lines are the expected output, with columns separated by spaces. `duckdb-query` executions are automatically retried the same way regular testdrive queries are.
662662

663663
```
664664
$ duckdb-query name=duckdb

src/mz-deploy/src/cli/commands/stage.rs

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1358,6 +1358,7 @@ mod tests {
13581358
Project::from(typed_project)
13591359
}
13601360

1361+
#[cfg_attr(miri, ignore)] // unsupported operation: can't call foreign function `rust_psm_stack_pointer` on OS `linux`
13611362
#[mz_ore::test]
13621363
fn test_full_deploy_view_not_indexed_mixed_types() {
13631364
let view_obj = make_typed_object(&["CREATE VIEW my_view AS SELECT 1"]);
@@ -1428,6 +1429,7 @@ mod tests {
14281429
);
14291430
}
14301431

1432+
#[cfg_attr(miri, ignore)] // unsupported operation: can't call foreign function `rust_psm_stack_pointer` on OS `linux`
14311433
#[mz_ore::test]
14321434
fn test_full_deploy_view_indexed_different_cluster() {
14331435
let view_obj = make_typed_object(&[
@@ -1498,6 +1500,7 @@ mod tests {
14981500
);
14991501
}
15001502

1503+
#[cfg_attr(miri, ignore)] // unsupported operation: can't call foreign function `rust_psm_stack_pointer` on OS `linux`
15011504
#[mz_ore::test]
15021505
fn test_incremental_deploy_view_updated_not_indexed() {
15031506
// Build planned project with all object types
@@ -1582,6 +1585,7 @@ mod tests {
15821585
);
15831586
}
15841587

1588+
#[cfg_attr(miri, ignore)] // unsupported operation: can't call foreign function `rust_psm_stack_pointer` on OS `linux`
15851589
#[mz_ore::test]
15861590
fn test_incremental_deploy_view_updated_indexed_different_cluster() {
15871591
// Build planned project with indexed view and other object types
@@ -1854,6 +1858,7 @@ mod tests {
18541858
Project::from(typed_project)
18551859
}
18561860

1861+
#[cfg_attr(miri, ignore)] // unsupported operation: can't call foreign function `rust_psm_stack_pointer` on OS `linux`
18571862
#[mz_ore::test]
18581863
fn test_build_snapshot_replacement_schema_kind() {
18591864
let mv_obj =
@@ -1892,6 +1897,7 @@ mod tests {
18921897
);
18931898
}
18941899

1900+
#[cfg_attr(miri, ignore)] // unsupported operation: can't call foreign function `rust_psm_stack_pointer` on OS `linux`
18951901
#[mz_ore::test]
18961902
fn test_build_snapshot_no_replacement_schemas_all_objects() {
18971903
let mv_obj =
@@ -1920,6 +1926,7 @@ mod tests {
19201926
);
19211927
}
19221928

1929+
#[cfg_attr(miri, ignore)] // unsupported operation: can't call foreign function `rust_psm_stack_pointer` on OS `linux`
19231930
#[mz_ore::test]
19241931
fn test_record_stage_metadata_transition_override() {
19251932
// During an Objects→Replacement transition, MVs go through the regular

src/mz-deploy/src/client/connection.rs

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -880,6 +880,7 @@ mod tests {
880880
assert!(matches!(connector, Connector::NoTls));
881881
}
882882

883+
#[cfg_attr(miri, ignore)] // unsupported operation: can't call foreign function `rust_psm_stack_pointer` on OS `linux`
883884
#[mz_ore::test]
884885
fn build_prefer_returns_tls_no_ca_work() {
885886
let connector = build_connector(ConnectorSpec::Tls {
@@ -891,6 +892,7 @@ mod tests {
891892
assert!(matches!(connector, Connector::Tls(_)));
892893
}
893894

895+
#[cfg_attr(miri, ignore)] // unsupported operation: can't call foreign function `rust_psm_stack_pointer` on OS `linux`
894896
#[mz_ore::test]
895897
fn build_explicit_missing_ca_returns_ca_not_found() {
896898
let err = build_connector(ConnectorSpec::Tls {

src/mz-deploy/src/lsp/code_lens.rs

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -200,6 +200,7 @@ mod tests {
200200
assert_eq!(find_test_line(text, "nonexistent"), None);
201201
}
202202

203+
#[cfg_attr(miri, ignore)] // unsupported operation: can't call foreign function `rust_psm_stack_pointer` on OS `linux`
203204
#[mz_ore::test]
204205
fn test_single_test() {
205206
let root = tempfile::tempdir().unwrap();
@@ -228,6 +229,7 @@ mod tests {
228229
);
229230
}
230231

232+
#[cfg_attr(miri, ignore)] // unsupported operation: can't call foreign function `rust_psm_stack_pointer` on OS `linux`
231233
#[mz_ore::test]
232234
fn test_multiple_tests() {
233235
let root = tempfile::tempdir().unwrap();
@@ -263,6 +265,7 @@ mod tests {
263265
assert_ne!(lenses[0].range.start.line, lenses[1].range.start.line);
264266
}
265267

268+
#[cfg_attr(miri, ignore)] // unsupported operation: can't call foreign function `rust_psm_stack_pointer` on OS `linux`
266269
#[mz_ore::test]
267270
fn test_no_tests() {
268271
let root = tempfile::tempdir().unwrap();
@@ -279,6 +282,7 @@ mod tests {
279282
assert!(lenses.is_empty());
280283
}
281284

285+
#[cfg_attr(miri, ignore)] // unsupported operation: can't call foreign function `rust_psm_stack_pointer` on OS `linux`
282286
#[mz_ore::test]
283287
fn test_file_not_in_project() {
284288
let root = tempfile::tempdir().unwrap();

src/mz-deploy/src/lsp/completion.rs

Lines changed: 28 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -689,6 +689,7 @@ mod tests {
689689
assert_eq!(ctx.text, "public.f");
690690
}
691691

692+
#[cfg_attr(miri, ignore)] // unsupported operation: can't call foreign function `rust_psm_stack_pointer` on OS `linux`
692693
#[mz_ore::test]
693694
fn same_schema_bare_name() {
694695
let root = tempfile::tempdir().unwrap();
@@ -714,6 +715,7 @@ mod tests {
714715
);
715716
}
716717

718+
#[cfg_attr(miri, ignore)] // unsupported operation: can't call foreign function `rust_psm_stack_pointer` on OS `linux`
717719
#[mz_ore::test]
718720
fn cross_schema_qualified() {
719721
let root = tempfile::tempdir().unwrap();
@@ -748,6 +750,7 @@ mod tests {
748750
);
749751
}
750752

753+
#[cfg_attr(miri, ignore)] // unsupported operation: can't call foreign function `rust_psm_stack_pointer` on OS `linux`
751754
#[mz_ore::test]
752755
fn cross_database_fully_qualified() {
753756
let root = tempfile::tempdir().unwrap();
@@ -772,6 +775,7 @@ mod tests {
772775
);
773776
}
774777

778+
#[cfg_attr(miri, ignore)] // unsupported operation: can't call foreign function `rust_psm_stack_pointer` on OS `linux`
775779
#[mz_ore::test]
776780
fn external_deps_included() {
777781
let root = tempfile::tempdir().unwrap();
@@ -810,6 +814,7 @@ mod tests {
810814
assert_eq!(ext_items[0].label, "ext.src");
811815
}
812816

817+
#[cfg_attr(miri, ignore)] // unsupported operation: can't call foreign function `rust_psm_stack_pointer` on OS `linux`
813818
#[mz_ore::test]
814819
fn kind_mapping() {
815820
let root = tempfile::tempdir().unwrap();
@@ -839,6 +844,7 @@ mod tests {
839844
assert_eq!(view_item.kind, Some(CompletionItemKind::STRUCT));
840845
}
841846

847+
#[cfg_attr(miri, ignore)] // unsupported operation: can't call foreign function `rust_psm_stack_pointer` on OS `linux`
842848
#[mz_ore::test]
843849
fn file_outside_models_returns_empty() {
844850
let root = tempfile::tempdir().unwrap();
@@ -853,6 +859,7 @@ mod tests {
853859
assert!(items.is_empty());
854860
}
855861

862+
#[cfg_attr(miri, ignore)] // unsupported operation: can't call foreign function `rust_psm_stack_pointer` on OS `linux`
856863
#[mz_ore::test]
857864
fn schema_prefix_strips_label_to_bare_name() {
858865
let root = tempfile::tempdir().unwrap();
@@ -883,6 +890,7 @@ mod tests {
883890
);
884891
}
885892

893+
#[cfg_attr(miri, ignore)] // unsupported operation: can't call foreign function `rust_psm_stack_pointer` on OS `linux`
886894
#[mz_ore::test]
887895
fn db_prefix_disambiguates_to_schema_dot_object() {
888896
let root = tempfile::tempdir().unwrap();
@@ -908,6 +916,7 @@ mod tests {
908916
);
909917
}
910918

919+
#[cfg_attr(miri, ignore)] // unsupported operation: can't call foreign function `rust_psm_stack_pointer` on OS `linux`
911920
#[mz_ore::test]
912921
fn full_qualification_strips_to_bare_name() {
913922
let root = tempfile::tempdir().unwrap();
@@ -931,6 +940,7 @@ mod tests {
931940
);
932941
}
933942

943+
#[cfg_attr(miri, ignore)] // unsupported operation: can't call foreign function `rust_psm_stack_pointer` on OS `linux`
934944
#[mz_ore::test]
935945
fn prefix_filters_non_matching_objects() {
936946
let root = tempfile::tempdir().unwrap();
@@ -983,6 +993,7 @@ mod tests {
983993
std::fs::write(root.join("types.lock"), toml).unwrap();
984994
}
985995

996+
#[cfg_attr(miri, ignore)] // unsupported operation: can't call foreign function `rust_psm_stack_pointer` on OS `linux`
986997
#[mz_ore::test]
987998
fn column_deps_at_zero_dots() {
988999
let root = tempfile::tempdir().unwrap();
@@ -1018,6 +1029,7 @@ mod tests {
10181029
assert!(labels.contains(&"bar"), "expected 'bar', got: {:?}", labels);
10191030
}
10201031

1032+
#[cfg_attr(miri, ignore)] // unsupported operation: can't call foreign function `rust_psm_stack_pointer` on OS `linux`
10211033
#[mz_ore::test]
10221034
fn column_deps_filtered_by_prefix() {
10231035
let root = tempfile::tempdir().unwrap();
@@ -1058,6 +1070,7 @@ mod tests {
10581070
);
10591071
}
10601072

1073+
#[cfg_attr(miri, ignore)] // unsupported operation: can't call foreign function `rust_psm_stack_pointer` on OS `linux`
10611074
#[mz_ore::test]
10621075
fn column_deps_no_types_cache() {
10631076
let root = tempfile::tempdir().unwrap();
@@ -1079,6 +1092,7 @@ mod tests {
10791092
assert!(items.is_empty(), "expected empty without types cache");
10801093
}
10811094

1095+
#[cfg_attr(miri, ignore)] // unsupported operation: can't call foreign function `rust_psm_stack_pointer` on OS `linux`
10821096
#[mz_ore::test]
10831097
fn column_deps_multiple_dependencies() {
10841098
let root = tempfile::tempdir().unwrap();
@@ -1112,6 +1126,7 @@ mod tests {
11121126
assert!(labels.contains(&"b"), "expected 'b', got: {:?}", labels);
11131127
}
11141128

1129+
#[cfg_attr(miri, ignore)] // unsupported operation: can't call foreign function `rust_psm_stack_pointer` on OS `linux`
11151130
#[mz_ore::test]
11161131
fn column_qualified_bare_object() {
11171132
let root = tempfile::tempdir().unwrap();
@@ -1156,6 +1171,7 @@ mod tests {
11561171
);
11571172
}
11581173

1174+
#[cfg_attr(miri, ignore)] // unsupported operation: can't call foreign function `rust_psm_stack_pointer` on OS `linux`
11591175
#[mz_ore::test]
11601176
fn column_qualified_schema_object() {
11611177
let root = tempfile::tempdir().unwrap();
@@ -1199,6 +1215,7 @@ mod tests {
11991215
);
12001216
}
12011217

1218+
#[cfg_attr(miri, ignore)] // unsupported operation: can't call foreign function `rust_psm_stack_pointer` on OS `linux`
12021219
#[mz_ore::test]
12031220
fn column_qualified_fully_qualified() {
12041221
let root = tempfile::tempdir().unwrap();
@@ -1237,6 +1254,7 @@ mod tests {
12371254
assert!(labels.contains(&"id"), "expected 'id', got: {:?}", labels);
12381255
}
12391256

1257+
#[cfg_attr(miri, ignore)] // unsupported operation: can't call foreign function `rust_psm_stack_pointer` on OS `linux`
12401258
#[mz_ore::test]
12411259
fn column_qualified_non_dependency_excluded() {
12421260
let root = tempfile::tempdir().unwrap();
@@ -1289,6 +1307,7 @@ mod tests {
12891307
);
12901308
}
12911309

1310+
#[cfg_attr(miri, ignore)] // unsupported operation: can't call foreign function `rust_psm_stack_pointer` on OS `linux`
12921311
#[mz_ore::test]
12931312
fn column_qualified_object_not_in_cache() {
12941313
let root = tempfile::tempdir().unwrap();
@@ -1319,6 +1338,7 @@ mod tests {
13191338
assert!(items.is_empty(), "expected empty when object not in cache");
13201339
}
13211340

1341+
#[cfg_attr(miri, ignore)] // unsupported operation: can't call foreign function `rust_psm_stack_pointer` on OS `linux`
13221342
#[mz_ore::test]
13231343
fn column_qualified_filter_case_insensitive() {
13241344
let root = tempfile::tempdir().unwrap();
@@ -1367,6 +1387,7 @@ mod tests {
13671387
);
13681388
}
13691389

1390+
#[cfg_attr(miri, ignore)] // unsupported operation: can't call foreign function `rust_psm_stack_pointer` on OS `linux`
13701391
#[mz_ore::test]
13711392
fn column_kind_and_detail() {
13721393
let root = tempfile::tempdir().unwrap();
@@ -1406,6 +1427,7 @@ mod tests {
14061427
assert_eq!(name_item.detail.as_deref(), Some("text (nullable)"));
14071428
}
14081429

1430+
#[cfg_attr(miri, ignore)] // unsupported operation: can't call foreign function `rust_psm_stack_pointer` on OS `linux`
14091431
#[mz_ore::test]
14101432
fn column_sort_before_objects() {
14111433
let root = tempfile::tempdir().unwrap();
@@ -1457,6 +1479,7 @@ mod tests {
14571479
}
14581480
}
14591481

1482+
#[cfg_attr(miri, ignore)] // unsupported operation: can't call foreign function `rust_psm_stack_pointer` on OS `linux`
14601483
#[mz_ore::test]
14611484
fn column_alias_explicit() {
14621485
let root = tempfile::tempdir().unwrap();
@@ -1501,6 +1524,7 @@ mod tests {
15011524
);
15021525
}
15031526

1527+
#[cfg_attr(miri, ignore)] // unsupported operation: can't call foreign function `rust_psm_stack_pointer` on OS `linux`
15041528
#[mz_ore::test]
15051529
fn column_alias_bare_table_name() {
15061530
let root = tempfile::tempdir().unwrap();
@@ -1540,6 +1564,7 @@ mod tests {
15401564
assert!(labels.contains(&"id"), "expected 'id', got: {:?}", labels);
15411565
}
15421566

1567+
#[cfg_attr(miri, ignore)] // unsupported operation: can't call foreign function `rust_psm_stack_pointer` on OS `linux`
15431568
#[mz_ore::test]
15441569
fn column_alias_non_dependency_empty() {
15451570
let root = tempfile::tempdir().unwrap();
@@ -1593,6 +1618,7 @@ mod tests {
15931618
);
15941619
}
15951620

1621+
#[cfg_attr(miri, ignore)] // unsupported operation: can't call foreign function `rust_psm_stack_pointer` on OS `linux`
15961622
#[mz_ore::test]
15971623
fn column_alias_multiple_joins() {
15981624
let root = tempfile::tempdir().unwrap();
@@ -1647,6 +1673,7 @@ mod tests {
16471673
);
16481674
}
16491675

1676+
#[cfg_attr(miri, ignore)] // unsupported operation: can't call foreign function `rust_psm_stack_pointer` on OS `linux`
16501677
#[mz_ore::test]
16511678
fn column_alias_case_insensitive() {
16521679
let root = tempfile::tempdir().unwrap();
@@ -1690,6 +1717,7 @@ mod tests {
16901717
);
16911718
}
16921719

1720+
#[cfg_attr(miri, ignore)] // unsupported operation: can't call foreign function `rust_psm_stack_pointer` on OS `linux`
16931721
#[mz_ore::test]
16941722
fn column_alias_non_query_stmt_empty_map() {
16951723
let root = tempfile::tempdir().unwrap();

src/mz-deploy/src/lsp/diagnostics.rs

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -373,13 +373,15 @@ fn utf16_len(text: &str) -> usize {
373373
mod tests {
374374
use super::*;
375375

376+
#[cfg_attr(miri, ignore)] // unsupported operation: can't call foreign function `rust_psm_stack_pointer` on OS `linux`
376377
#[mz_ore::test]
377378
fn valid_sql_produces_no_diagnostics() {
378379
let text = "CREATE VIEW foo AS SELECT 1;";
379380
let rope = Rope::from_str(text);
380381
assert!(diagnose(text, &rope, &BTreeMap::new(), None).is_empty());
381382
}
382383

384+
#[cfg_attr(miri, ignore)] // unsupported operation: can't call foreign function `rust_psm_stack_pointer` on OS `linux`
383385
#[mz_ore::test]
384386
fn syntax_error_produces_diagnostic_at_correct_position() {
385387
let text = "CREATE VIEW foo AS SELECTT 1;";
@@ -391,6 +393,7 @@ mod tests {
391393
assert_eq!(diags[0].range.start.line, 0);
392394
}
393395

396+
#[cfg_attr(miri, ignore)] // unsupported operation: can't call foreign function `rust_psm_stack_pointer` on OS `linux`
394397
#[mz_ore::test]
395398
fn multiline_error_position() {
396399
let text = "CREATE VIEW foo AS\nSELECT 1;\nCREATE VIEW bar AS SELECTT 2;";
@@ -444,6 +447,7 @@ mod tests {
444447
.collect()
445448
}
446449

450+
#[cfg_attr(miri, ignore)] // unsupported operation: can't call foreign function `rust_psm_stack_pointer` on OS `linux`
447451
#[mz_ore::test]
448452
fn resolved_variable_no_diagnostics() {
449453
let text = "CREATE MATERIALIZED VIEW mv IN CLUSTER quickstart AS SELECT 1";
@@ -452,6 +456,7 @@ mod tests {
452456
assert!(diags.is_empty());
453457
}
454458

459+
#[cfg_attr(miri, ignore)] // unsupported operation: can't call foreign function `rust_psm_stack_pointer` on OS `linux`
455460
#[mz_ore::test]
456461
fn resolved_variable_produces_clean_parse() {
457462
let v = vars(&[("cluster", "quickstart")]);
@@ -490,6 +495,7 @@ mod tests {
490495
assert_eq!(var_diags[0].severity, Some(DiagnosticSeverity::WARNING));
491496
}
492497

498+
#[cfg_attr(miri, ignore)] // unsupported operation: can't call foreign function `rust_psm_stack_pointer` on OS `linux`
493499
#[mz_ore::test]
494500
fn parse_error_maps_back_to_original_position() {
495501
// After resolving :x → "ab", the parse error in resolved text
@@ -509,6 +515,7 @@ mod tests {
509515
assert_eq!(parse_diags[0].range.start.line, 0);
510516
}
511517

518+
#[cfg_attr(miri, ignore)] // unsupported operation: can't call foreign function `rust_psm_stack_pointer` on OS `linux`
512519
#[mz_ore::test]
513520
fn no_variables_unchanged_behavior() {
514521
let text = "CREATE VIEW foo AS SELECT 1;";

0 commit comments

Comments
 (0)