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

JSON test failures under NetCore 3.1 #270

Closed
fabianoliver opened this issue Sep 3, 2023 · 0 comments · Fixed by #273
Closed

JSON test failures under NetCore 3.1 #270

fabianoliver opened this issue Sep 3, 2023 · 0 comments · Fixed by #273
Assignees
Labels
bug Something isn't working

Comments

@fabianoliver
Copy link
Contributor

When running Chr.Avro.Json.Tests using TargetFramework netcoreapp3.1, three unit tests fail.
Unless that's any test-specific issue, that might mean Chr.Avro.Json might have issues with some .netstandard2 compatible .Net versions.

[xUnit.net 00:00:00.88]     Chr.Avro.Abstract.Tests.JsonDefaultValueShould.UseFirstChildOfUnionSchema [FAIL]
[xUnit.net 00:00:00.88]     Chr.Avro.Abstract.Tests.JsonDefaultValueShould.ConvertValueToObject [FAIL]
  Failed Chr.Avro.Abstract.Tests.JsonDefaultValueShould.UseFirstChildOfUnionSchema [7 ms]
  Error Message:
   System.Text.Json.JsonException : The JSON value could not be converted to System.Text.Json.JsonDocument. Path: $ | LineNumber: 0 | BytePositionInLine: 1.
  Stack Trace:
     at System.Text.Json.ThrowHelper.ThrowJsonException_DeserializeUnableToConvertValue(Type propertyType)
   at System.Text.Json.JsonPropertyInfoNotNullable`4.OnRead(ReadStack& state, Utf8JsonReader& reader)
   at System.Text.Json.JsonPropertyInfo.Read(JsonTokenType tokenType, ReadStack& state, Utf8JsonReader& reader)
   at System.Text.Json.JsonSerializer.ReadCore(JsonSerializerOptions options, Utf8JsonReader& reader, ReadStack& readStack)
   at System.Text.Json.JsonSerializer.ReadCore(Type returnType, JsonSerializerOptions options, Utf8JsonReader& reader)
   at System.Text.Json.JsonSerializer.Deserialize(String json, Type returnType, JsonSerializerOptions options)
   at System.Text.Json.JsonSerializer.Deserialize[TValue](String json, JsonSerializerOptions options)
   at Chr.Avro.Abstract.Tests.JsonDefaultValueShould.UseFirstChildOfUnionSchema() in C:\src\avro\dotnet-avro\tests\Chr.Avro.Json.Tests\JsonDefaultValueShould.cs:line 34
  Failed Chr.Avro.Abstract.Tests.JsonDefaultValueShould.ConvertValueToObject [< 1 ms]
  Error Message:
   System.Text.Json.JsonException : The JSON value could not be converted to System.Text.Json.JsonDocument. Path: $ | LineNumber: 0 | BytePositionInLine: 1.
  Stack Trace:
     at System.Text.Json.ThrowHelper.ThrowJsonException_DeserializeUnableToConvertValue(Type propertyType)
   at System.Text.Json.JsonPropertyInfoNotNullable`4.OnRead(ReadStack& state, Utf8JsonReader& reader)
   at System.Text.Json.JsonPropertyInfo.Read(JsonTokenType tokenType, ReadStack& state, Utf8JsonReader& reader)
   at System.Text.Json.JsonSerializer.ReadCore(JsonSerializerOptions options, Utf8JsonReader& reader, ReadStack& readStack)
   at System.Text.Json.JsonSerializer.ReadCore(Type returnType, JsonSerializerOptions options, Utf8JsonReader& reader)
   at System.Text.Json.JsonSerializer.Deserialize(String json, Type returnType, JsonSerializerOptions options)
   at System.Text.Json.JsonSerializer.Deserialize[TValue](String json, JsonSerializerOptions options)
   at Chr.Avro.Abstract.Tests.JsonDefaultValueShould.ConvertValueToObject() in C:\src\avro\dotnet-avro\tests\Chr.Avro.Json.Tests\JsonDefaultValueShould.cs:line 12
[xUnit.net 00:00:00.88]     Chr.Avro.Abstract.Tests.JsonDefaultValueShould.ThrowWhenConstructedWithNullSchema [FAIL]
  Failed Chr.Avro.Abstract.Tests.JsonDefaultValueShould.ThrowWhenConstructedWithNullSchema [< 1 ms]
  Error Message:
   System.Text.Json.JsonException : The JSON value could not be converted to System.Text.Json.JsonDocument. Path: $ | LineNumber: 0 | BytePositionInLine: 1.
  Stack Trace:
     at System.Text.Json.ThrowHelper.ThrowJsonException_DeserializeUnableToConvertValue(Type propertyType)
   at System.Text.Json.JsonPropertyInfoNotNullable`4.OnRead(ReadStack& state, Utf8JsonReader& reader)
   at System.Text.Json.JsonPropertyInfo.Read(JsonTokenType tokenType, ReadStack& state, Utf8JsonReader& reader)
   at System.Text.Json.JsonSerializer.ReadCore(JsonSerializerOptions options, Utf8JsonReader& reader, ReadStack& readStack)
   at System.Text.Json.JsonSerializer.ReadCore(Type returnType, JsonSerializerOptions options, Utf8JsonReader& reader)
   at System.Text.Json.JsonSerializer.Deserialize(String json, Type returnType, JsonSerializerOptions options)
   at System.Text.Json.JsonSerializer.Deserialize[TValue](String json, JsonSerializerOptions options)
   at Chr.Avro.Abstract.Tests.JsonDefaultValueShould.ThrowWhenConstructedWithNullSchema() in C:\src\avro\dotnet-avro\tests\Chr.Avro.Json.Tests\JsonDefaultValueShould.cs:line 25

Failed!  - Failed:     3, Passed:   363, Skipped:     0, Total:   366, Duration: 180 ms - Chr.Avro.Json.Tests.dll (netcoreapp3.1)
@dstelljes dstelljes linked a pull request Sep 5, 2023 that will close this issue
@dstelljes dstelljes self-assigned this Sep 5, 2023
@dstelljes dstelljes added the bug Something isn't working label Sep 5, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants