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

Swallow MSDTC availability exceptions for CI test reliability #77023

Merged
merged 1 commit into from
Oct 18, 2022

Conversation

roji
Copy link
Member

@roji roji commented Oct 13, 2022

Fixes #76836

/cc @ajcvickers

@ghost
Copy link

ghost commented Oct 13, 2022

Tagging subscribers to this area: @roji
See info in area-owners.md if you want to be subscribed.

Issue Details

Fixes #76836

Author: roji
Assignees: -
Labels:

area-System.Transactions

Milestone: -

// We don't want this to make our CI flaky, so we swallow the exception and skip all subsequent tests.
s_isTestSuiteDisabled = true;

return;
Copy link
Member Author

Choose a reason for hiding this comment

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

@stephentoub do we have a standard way to detect CI, so that this can continue throwing when run locally (e.g. GetEnvironmentVariable("CI") or something)?

Copy link
Member

Choose a reason for hiding this comment

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

I'm not aware of a method we call anywhere to ask whether we're running in CI, but we do have an attribute we apply to suppress a test when in CI:

[Trait(XunitConstants.Category, XunitConstants.IgnoreForCI)]

Copy link
Member Author

Choose a reason for hiding this comment

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

Thanks, I'll take a look at how that's implemented.

Copy link
Member

Choose a reason for hiding this comment

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

Copy link
Member Author

Choose a reason for hiding this comment

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

Thank you!

@BruceForstall
Copy link
Member

@roji Is there anything blocking this from being reviewed/merged? The failure noise in AzDO pipelines from these tests is quite annoying.

@roji
Copy link
Member Author

roji commented Oct 18, 2022

Sorry, I've been busy with other things - will give this my priority.

@roji roji merged commit fdcbc7b into dotnet:main Oct 18, 2022
@roji roji deleted the IgnoreDTCFailures branch October 18, 2022 22:02
@ghost ghost locked as resolved and limited conversation to collaborators Nov 18, 2022
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Test failure in System.Transactions.Tests.OleTxTests.* tests
5 participants