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

Skip sync tests in Cosmos #33860

Closed
wants to merge 1 commit into from
Closed

Skip sync tests in Cosmos #33860

wants to merge 1 commit into from

Conversation

roji
Copy link
Member

@roji roji commented May 31, 2024

Re-push of #33756

#33386 removed sync I/O support from Cosmos; the approach for the tests was to override e.g. all query tests, and introduce a special "NoSyncTest" wrapper to catch the special exception thrown when the test runs in the sync variant, and introduces is (async) checks in many tests. This forces us to deal with the sync case in each and every test.

This draft PR proposes to instead handle this via a simple [SkipSyncTests] attribute, which is used at the assembly level; if the test method being executed has a bool async parameter, and that parameter has a false argument, the test is skipped. We can then add a few targeted tests for the sync case which check that the appropriate exception is thrown.

@roji roji closed this May 31, 2024
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.

1 participant