NuGet / Insights

Gather insights about public NuGet.org package data
Apache License 2.0
24 stars 7 forks source link

Errors met when running unit tests under "Insights\test\Logic.Test" folder #68

Closed yifeis7 closed 2 years ago

yifeis7 commented 2 years ago
[xUnit.net 00:00:04.97]     Knapcode.ExplorePackages.CatalogCommitTimestampProviderTest.ReturnsExpectedFirstTimestamps [FAIL]
Data collector 'Blame' message: All tests finished running, Sequence file will not be generated.
  Failed Knapcode.ExplorePackages.CatalogCommitTimestampProviderTest.ReturnsExpectedFirstTimestamps [2 s]
  Error Message:
   System.InvalidProgramException : The JIT compiler encountered invalid IL code or an internal limitation.
  Stack Trace:
     at Azure.Data.Tables.Queryable.ExpressionWriter.ConvertExpressionToString(Expression e)
   at Azure.Data.Tables.Queryable.ExpressionWriter.ExpressionToString(Expression e)
   at Azure.Data.Tables.Queryable.ExpressionParser.VisitLambda(LambdaExpression lambda)
   at Azure.Data.Tables.Queryable.LinqExpressionVisitor.Visit(Expression exp)
   at Azure.Data.Tables.Queryable.ExpressionParser.Translate(Expression e)
   at Azure.Data.Tables.TableClient.Bind(Expression expression)
   at Azure.Data.Tables.TableServiceClient.QueryAsync(Expression`1 filter, Nullable`1 maxPerPage, CancellationToken cancellationToken)
   at Knapcode.ExplorePackages.TableExtensions.QueryAsync(TableServiceClient client, String prefix) in C:\Users\XXX\Insights-consistency\src\Logic\Storage\TableExtensions.cs:line 16
   at Knapcode.ExplorePackages.BaseLogicIntegrationTest.DisposeAsync() in C:\Users\XXX\Insights-consistency\test\Logic.Test\TestSupport\BaseLogicIntegrationTest.cs:line 289
  Standard Output Messages:
 [INF]   GET https://api.nuget.org/v3/catalog0/index.json
 [INF]   OK https://api.nuget.org/v3/catalog0/index.json 350ms
 [INF]   GET https://api.nuget.org/v3/catalog0/page0.json
 [INF]   OK https://api.nuget.org/v3/catalog0/page0.json 77ms
 [INF] Using the configured storage connection string.
 [INF] Blob endpoint: http://127.0.0.1:10000/devstoreaccount1
 [INF] Queue endpoint: http://127.0.0.1:10001/devstoreaccount1

This is one example of the error System.InvalidProgramException : The JIT compiler encountered invalid IL code or an internal limitation. when I ran this release version, and I have encountered many same errors when running the lastest version and the old release version. I have not found any helpful solutions when searching this on Google. Could you please give me some advice on how to solve this?

yifeis7 commented 2 years ago

We have solved the problem by changing azurite to azurite storage emulator.

joelverhagen commented 2 years ago

Glad you found that workaround. I've been finding Azurite issues and filing bugs/fixing them for a couple of months. The progress is tracked here: https://github.com/NuGet/Insights/issues/30. Hopefully we can switch over soon.

joelverhagen commented 2 years ago

By the way, @yifeis7 - I'd love to hear what you're using NuGet.Insights for and if there's any way I can help! No pressure, just curious 😃.

yifeis7 commented 2 years ago

We are implementing some tests on public repos. Insights is one of them. 😃