-
Notifications
You must be signed in to change notification settings - Fork 509
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
Repeated execution of tests for different language versions #3493
Comments
Yes, it helps make sure the behavior is consistent across different versions of Roslyn (sometimes behavior changes in Roslyn require workarounds to handle both situations). |
Not entirely sure on this one. Would need to check, but I think the default comes from the test project being run, and not the project a test is originally defined in. There are exceptions in cases where an individual test explicitly specifies a language version. |
After looking more at this, you are of course correct. Since the test projects for later c# versions reference later Roslyn versions, But there are quite a few tests that do set the language version explicitly, for example most tests in the c# 8, 9 and 10 test projects. Should these be changed, so we get the behaviour that you described? That test projects for later language versions inherit earlier test cases, but run them with there own language version instead. I have started removing explicit language versions and have not seen any problems so far. |
…0, so that they will be run with the expected (later) language version in later test projects DotNetAnalyzers#3493
…, so that they will be run with the expected (later) language version in later test projects DotNetAnalyzers#3493
…, so that they will be run with the expected (later) language version in later test projects DotNetAnalyzers#3493
…10. Previously, affected tests were always run with the specified language version, even in test projects for later language versions. DotNetAnalyzers#3493
…rsion in test projects for c# 8 and above DotNetAnalyzers#3493
…rsion in test projects for c# 8 and above DotNetAnalyzers#3493
…ion in test projects for c# 8 and above DotNetAnalyzers#3493
…ion in test projects for c# 8 and above DotNetAnalyzers#3493
A question about the test class inheritance that goes on between the version specific test projects:
I might be missing something, but it looks like most earlier tests are executed for later language versions as well, but without any change in the test setup. (I see that some tests actually change language version in test sub classes, but it does not seem to be very common.)
Two strategies seem reasonable two me:
What I think is happening now is that tests are re-executed in test projects for higher language versions, but still configured with the same language version as in the test project it was inherited from. So they are executed multiple times with exactly the same setup.
Is this intentional?
Or am I just dead wrong? 😁
Asking since its starting to take quite a while to run the tests.
The text was updated successfully, but these errors were encountered: