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

Update version of NUnit related packages #12639

Merged
merged 1 commit into from
Jan 26, 2022
Merged

Conversation

kant2002
Copy link
Contributor

I hitting bunch of exceptions during execution of dotnet test tests/FSharp.Compiler.Service.Tests/FSharp.Compiler.Service.Tests.fsproj on Linux with only .NET 6 installed.

System.ArgumentException: Unknown framework version 6.5 (Parameter 'version')
   at NUnit.Framework.Internal.RuntimeFramework.ThrowInvalidFrameworkVersion(Version version)
   at NUnit.Framework.Internal.RuntimeFramework.InitFromFrameworkVersion(Version version)
   at NUnit.Framework.Internal.RuntimeFramework..ctor(RuntimeType runtime, Version version)
   at NUnit.Framework.Internal.RuntimeFramework.<>c.<.cctor>b__33_0()
   at System.Lazy`1.ViaFactory(LazyThreadSafetyMode mode)
   at System.Lazy`1.ExecutionAndPublication(LazyHelper executionAndPublication, Boolean useDefaultConstructor)
   at System.Lazy`1.CreateValue()
   at System.Lazy`1.get_Value()
   at NUnit.Framework.Internal.RuntimeFramework.get_CurrentFramework()
   at NUnit.Framework.Internal.PlatformHelper..ctor()
   at NUnit.Framework.TestCaseAttribute.BuildFrom(IMethodInfo method, Test suite)+MoveNext()
   at NUnit.Framework.Internal.Builders.DefaultTestCaseBuilder.BuildFrom(IMethodInfo method, Test parentSuite)
   at NUnit.Framework.Internal.Builders.NUnitTestFixtureBuilder.AddTestCasesToFixture(TestFixture fixture, IPreFilter filter)
   at NUnit.Framework.Internal.Builders.NUnitTestFixtureBuilder.BuildFrom(ITypeInfo typeInfo, IPreFilter filter)
   at NUnit.Framework.Internal.Builders.DefaultSuiteBuilder.BuildFrom(ITypeInfo typeInfo, IPreFilter filter)

In spirit of #9947 maybe would be better to migrate these tests to XUnit

I hitting bunch of exceptions during execution of `dotnet test tests/FSharp.Compiler.Service.Tests/FSharp.Compiler.Service.Tests.fsproj` on Linux with only .NET 6 installed.
```
System.ArgumentException: Unknown framework version 6.5 (Parameter 'version')
   at NUnit.Framework.Internal.RuntimeFramework.ThrowInvalidFrameworkVersion(Version version)
   at NUnit.Framework.Internal.RuntimeFramework.InitFromFrameworkVersion(Version version)
   at NUnit.Framework.Internal.RuntimeFramework..ctor(RuntimeType runtime, Version version)
   at NUnit.Framework.Internal.RuntimeFramework.<>c.<.cctor>b__33_0()
   at System.Lazy`1.ViaFactory(LazyThreadSafetyMode mode)
   at System.Lazy`1.ExecutionAndPublication(LazyHelper executionAndPublication, Boolean useDefaultConstructor)
   at System.Lazy`1.CreateValue()
   at System.Lazy`1.get_Value()
   at NUnit.Framework.Internal.RuntimeFramework.get_CurrentFramework()
   at NUnit.Framework.Internal.PlatformHelper..ctor()
   at NUnit.Framework.TestCaseAttribute.BuildFrom(IMethodInfo method, Test suite)+MoveNext()
   at NUnit.Framework.Internal.Builders.DefaultTestCaseBuilder.BuildFrom(IMethodInfo method, Test parentSuite)
   at NUnit.Framework.Internal.Builders.NUnitTestFixtureBuilder.AddTestCasesToFixture(TestFixture fixture, IPreFilter filter)
   at NUnit.Framework.Internal.Builders.NUnitTestFixtureBuilder.BuildFrom(ITypeInfo typeInfo, IPreFilter filter)
   at NUnit.Framework.Internal.Builders.DefaultSuiteBuilder.BuildFrom(ITypeInfo typeInfo, IPreFilter filter)
```

In spirit of dotnet#9947 maybe would be better to migrate these tests to XUnit
@kant2002
Copy link
Contributor Author

While I was there I remove NUnitLiteVersion which is not used anywhere.

@vzarytovskii
Copy link
Member

vzarytovskii commented Jan 25, 2022

IIRC, this error happens when there are some issues with tests themselves, and has nothing to do with nuget packages. Tests are passing on Linux in the latest main.

@kant2002
Copy link
Contributor Author

The exception did not fail test (which is wierd). IF you go to latest build from main branch, in the Linux leg 'Build/Test' task, and look for line 2395 you will see same exception. And tests will pass (I assume that this is because tests which failed to discover are skipped).

I assume that issue which I was hitting is nunit/nunit#3565 which according to log was fixed in NUnit 3.13

@vzarytovskii
Copy link
Member

Hm, interesting, I've only been hitting it when some tests were failing.

@kant2002
Copy link
Contributor Author

So question, should I just bump version of NUnit (other dependencies most likely unrelated, just did not see point keep infra dependencies not updates). Or should I try to move tests to XUnit. Better tactical decision obviously just bump versions, but what's long term plan. Is move to Xunit freezed right now?

@vzarytovskii
Copy link
Member

Bumping version is fine. Long term plan is to continue moving tests to xunit.

@KevinRansom KevinRansom merged commit cd451dc into dotnet:main Jan 26, 2022
@kant2002 kant2002 deleted the patch-1 branch January 27, 2022 08:36
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