New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Ensure host is in a running state before running tests further #1534

Merged
merged 7 commits into from Apr 23, 2018

Conversation

2 participants
@peppy
Member

peppy commented Apr 21, 2018

Seems to fix remaining issues.

@@ -91,12 +95,15 @@ void complete()
}, e =>
{
complete();
throw new Exception("The test case threw an exception while running", e);
exception = e;

This comment has been minimized.

@smoogipoo

smoogipoo Apr 23, 2018

Contributor

We may want to set exception before completing, otherwise there's a potential data race.

});
});
while (!completed && host?.ExecutionState != ExecutionState.Stopped)
while (!completed && host.ExecutionState == ExecutionState.Running)

This comment has been minimized.

@smoogipoo

smoogipoo Apr 23, 2018

Contributor

Is this because Exit is explicitly called in the one time teardown? Specifically referring to this method potentially returning while the host is still running.

This comment has been minimized.

@peppy

peppy Apr 23, 2018

Member

I believe the case was when RunBlockingTest was called before the TestCase itself had reached BDL, causing host to be null here and exit before it even ran.

@peppy peppy merged commit 87baad0 into ppy:master Apr 23, 2018

1 check passed

continuous-integration/appveyor/pr AppVeyor build succeeded
Details

@peppy peppy deleted the peppy:fix-runaway-threads-2 branch Jul 5, 2018

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