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
DependsOn can execute a deferred-enumeration placeholder directly #7409
A test depending on a deferred-enumeration test can cause the deferred placeholder to execute directly. The run reports an extra failure saying the placeholder must be expanded before execution, even though its concrete case was already expanded.
Reproduction
Add a [Test] with [ClassDataSource<Resource>(DeferEnumeration = true)], and a second test with [DependsOn(typeof(DeferredTests), nameof(DeferredTests.Test), ProceedOnFailure = true)]. Select both classes with a namespace filter. In the observed case Resource has an injectable property whose data source throws during registration. The run reports both the expected registration failure and an extra Deferred enumeration placeholder ... was scheduled directly failure from DeferredEnumerationExecutableTest.CreateInstanceAsync.
Observed while adding ArgumentInjectionFailureTests in PR #7391; replacing DependsOn with ordered NotInParallel attributes avoids the extra placeholder execution. The regression's original dependency targeted Fails_During_Argument_Injection on ArgumentInjectionFailureTests.
Expected and actual
Dependency resolution should wait for expanded concrete tests. It should never enqueue the placeholder for direct execution.
Environment
PR #7391 head 85020f6 plus its deferred argument regression, SDK 10.0.403, net10.0, macOS arm64, source-generated discovery. Please make dependency scheduling expand or resolve deferred targets before execution.
Activity
Fix deferred dependency review findings for #7409
Fix deferred enumeration dependency targets (#7409)
Fix deferred dependency review findings for #7409
Fix deferred result lookup and terminal dependency edges (#7409)
Fix deferred outcome and lookup publication invariants (#7409)
Fix dependencies on deferred enumeration tests (#7471)