Skip to content

TestBuilder.BuildTestsStreamingAsync is unused and duplicates the row-building loop #7327

Closed

Description

@thomhurst

Summary

TestBuilder.BuildTestsStreamingAsync (src/TUnit.Engine/Building/TestBuilder.cs, declared on ITestBuilder) has no callers besides its own recursion for generic instantiations. Discovery and execution use BuildTestsFromMetadataAsync. The streaming copy duplicates the class/method row loop. Every fix to that loop, such as #7157 and #7205, has to be mirrored there without test coverage.

Where

  • src/TUnit.Engine/Building/Interfaces/ITestBuilder.cs: BuildTestsStreamingAsync
  • src/TUnit.Engine/Building/TestBuilder.cs: BuildTestsStreamingAsync, BuildSingleTestAsync

grep -rn BuildTestsStreamingAsync src tests finds only the interface, the implementation, and its recursive call.

Expected

Remove the unused streaming path (and BuildSingleTestAsync). If it is meant to be used, wire it up and cover it with tests.

Activity

  1. added
    enhancementNew feature or request
    P3Low: cleanup, minor enhancement, or rare edge case
    on Nov 1, 2026
  2. thomhurst commented on Nov 2, 2026

    @thomhurst
    OwnerAuthor

    Still valid on origin/main d8badac: BuildTestsStreamingAsync has only its interface declaration, implementation and recursive call; BuildSingleTestAsync is used only by that loop. #7328 closed without merging. Its row-event changes now live in #7381 / open PR #7384, which edits the same streaming path; added #7381 as the direct prerequisite. #7326 remains the failed-row follow-up that may also touch this path.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    P3Low: cleanup, minor enhancement, or rare edge caseenhancementNew feature or requestin-progressWork is in progress

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions