Skip to content

test(core): simplify multi-relationship calc-col test to follow the plain #[tokio::test] convention #2453

Description

@goldmedal

Background

In #2450 (fix for multi-relationship calculated-column JOINs), the regression test test_multiple_relationship_calculated_columns runs its body on a hand-rolled std::thread::Builder with an explicit stack_size(8 * 1024 * 1024) and a dedicated current-thread Tokio runtime, split into a *_inner async fn:

#[tokio::test(flavor = "multi_thread", worker_threads = 1)]
async fn test_multiple_relationship_calculated_columns() -> Result<()> {
    std::thread::Builder::new()
        .stack_size(8 * 1024 * 1024)
        .spawn(|| { /* build a current-thread runtime and block_on(_inner()) */ })
        .unwrap()
        .join()
        .unwrap()
}

This is inconsistent with the rest of core/wren-core/core/src/mdl/mod.rs, where every other test is a plain #[tokio::test]. The suite is already run under RUST_MIN_STACK=8388608 (documented in core/wren-core/CLAUDE.md and set in the CI test step), so the enlarged stack should be available to a normal test thread without the bespoke wrapper.

Task

  • Convert test_multiple_relationship_calculated_columns to a plain #[tokio::test], inlining the _inner async fn body.
  • Confirm it still passes under RUST_MIN_STACK=8388608 cargo test (i.e. the analyzer recursion does not overflow the default stack once the env var is honored).
  • If — and only if — the enlarged stack genuinely is not picked up in that context, keep the explicit thread but document why more precisely.

Notes

Non-blocking cleanup only; no behavior change. The fix in #2450 is correct and can merge as-is. Raised from review discussion: #2450 (comment)

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Fields

    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions