Skip to content
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

Always Flush test results,even if RecordEnd is not called #1573

Merged
merged 1 commit into from
May 4, 2018
Merged

Always Flush test results,even if RecordEnd is not called #1573

merged 1 commit into from
May 4, 2018

Conversation

mayankbansal018
Copy link
Contributor

@mayankbansal018 mayankbansal018 commented May 3, 2018

Description

TestResults are not flushed if datacollection is enabled, & RecordEnd is not invoked.

Related issue

Fixes #1519

@@ -178,13 +178,9 @@ public void RecordResultShouldFlushIfTestCaseEndWasCalledBefore()
}

[TestMethod]
public void RecordResultShouldNotFlushIfTestCaseEndWasNotCalledBefore()
public void RecordResultShouldFlushEvenIfTestCaseEndWasCalledBefore()
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Rename RecordResultShouldFlushEvenIfTestCaseEndWasNotCalled or remove this test.

@@ -45,7 +43,6 @@ public TestExecutionRecorder(ITestCaseEventsHandler testCaseEventsHandler, ITest
// 3. Test Case Result.
// If that is not that case.
// If Test Adapters don't send the events in the above order, Test Case Results are cached till the Test Case End event is received.
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Update the comment.

@@ -144,32 +119,15 @@ public void RecordEnd(TestCase testCase, TestOutcome outcome)
lock (this.testCaseEndStatusSyncObject)
{
isTestCaseEndAlreadySent = this.testCaseEndStatusMap.Contains(testCase.Id);
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Can we remove testCaseEndStatusMap too?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thought about , but wasn't sure so didn't take it up in this PR.

Copy link
Contributor

@cltshivash cltshivash left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

:shipit:

@mayankbansal018 mayankbansal018 merged commit 3bd2fee into microsoft:master May 4, 2018
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants