You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
Reflection discovery: DiscoverGenericTests and DiscoverGenericTestsStreamingAsync duplicate the generic-class logic #7167
src/TUnit.Engine/Discovery/ReflectionTestDataCollector.cs has two copies of the generic-class discovery logic: DiscoverGenericTests (around line 657, returns a List<TestMetadata>) and DiscoverGenericTestsStreamingAsync (around line 862, returns IAsyncEnumerable<TestMetadata>). Both walk [GenerateGenericTest] attributes and class row groups, scope method rows (#7118), build test metadata and record constraint violations. Every fix in this area has to be made twice, for example #7106, #7107 and #7118 (PR #7149, which added about 40 more duplicated lines). The two copies already differ in small ways (cancellation checks, how failures are collected), which makes drift hard to spot in review.
Raised by the automated review on PR #7149 (#7149 (comment), point 2). Out of scope for that PR.
Expected
One implementation that both entry points use, for example the streaming version with the list version collecting it, or a shared helper that decides the instantiations and the method rows for a given (method, typeArguments). Discovery hot-path performance should be measured before and after, as AGENTS.md asks.
Activity
refactor(engine): remove dead streaming reflection discovery and shar…