Skip to content

Add class/assembly cleanup/init messages to first/last test#1390

Merged
Evangelink merged 16 commits intomicrosoft:mainfrom
engyebrahim:pr/1340-add-cleanup-and-init-logs
Nov 24, 2022
Merged

Add class/assembly cleanup/init messages to first/last test#1390
Evangelink merged 16 commits intomicrosoft:mainfrom
engyebrahim:pr/1340-add-cleanup-and-init-logs

Conversation

@engyebrahim
Copy link
Member

fix: #1340

Copy link
Member

@Evangelink Evangelink left a comment

Choose a reason for hiding this comment

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

Overall LGTM. Could you please review the test caseInheritClassWithCleanupInheritanceBehaviorNone_ParentTestMethod where the order of calls changed?

Copy link
Member

@Evangelink Evangelink left a comment

Choose a reason for hiding this comment

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

I think there is something fishy with the implementation (maybe how you find the test to attach cleanup results to) because it seems that the ClassCleanup.InheritanceBehaviorBeforeEachDerivedClass messages are not attached to the correct test.

if (!StringEx.IsNullOrEmpty(DebugTrace))
{
string debugTraceMessagesInStdOut = string.Format(CultureInfo.InvariantCulture, "\n\n{0}\n{1}", Resource.DebugTraceBanner, DebugTrace);
string debugTraceMessagesInStdOut = string.Format(CultureInfo.CurrentCulture, "{2}{2}{0}{2}{1}", Resource.DebugTraceBanner, DebugTrace, Environment.NewLine);
Copy link
Member

Choose a reason for hiding this comment

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

Use OS line return to avoid mixing line return kinds.

@Evangelink Evangelink self-requested a review November 23, 2022 22:18
Evangelink
Evangelink previously approved these changes Nov 23, 2022
@Evangelink Evangelink merged commit 31f86eb into microsoft:main Nov 24, 2022
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.

Assembly and class cleanup and init TestContext.WriteLine() don't appear in any place.

2 participants