Skip to content

Inherited test classes never finishes execution, timeout never enforced. #3653

Description

@TheRumle

The issue

I have two test that inherit from a test class:

[InheritsTests]
[TestSubject(typeof(DepthFirstStrategy))]
[ApplicationFixtureGenerator<DepthFirstStrategy>]
public sealed class DepthFirstStrategyTest(ApplicationFixture<DepthFirstStrategy> fixture)
    : NodeTreeTraverserTest(fixture, nameof(DepthFirstStrategy), () => fixture.TestedService);


[InheritsTests]
[TestSubject(typeof(BreadthFirstStrategy))]
[ApplicationFixtureGenerator<BreadthFirstStrategy>]
public sealed class BreadthFirstStrategyTest(ApplicationFixture<BreadthFirstStrategy> fixture)
    : NodeTreeTraverserTest(fixture, nameof(BreadthFirstStrategy), () => fixture.TestedService);

Only the BreadthFirstStrategyTest runs. The other one loops forever when trying to invoke the injected lambda. I have no idea what makes this difference between the two tests. All inherited tests are also marked with timeouts that are also ignored.

I believe the issue might lie in the combination of a datasource generator generating elements that are IAsyncDisposable and IAsyncInitializer in combination with inherited tests. Any suggestion on how to approach this?

Environment

IDE: Rider
OS: Windows 11, Version 10.0.26200 Build 26200
.NET: 9.0.203

Activity

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

Metadata

Metadata

Assignees

Labels

No labels
No labels

Projects

No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions