Skip to content

Fix System.Net.Http.Json tests in AOT - #89307

Merged
eiriktsarpalis merged 1 commit into
dotnet:mainfrom
eiriktsarpalis:fix/httpclient-json-aot-tests
Jul 21, 2023
Merged

Fix System.Net.Http.Json tests in AOT#89307
eiriktsarpalis merged 1 commit into
dotnet:mainfrom
eiriktsarpalis:fix/httpclient-json-aot-tests

Conversation

@eiriktsarpalis

@eiriktsarpalis eiriktsarpalis commented Jul 21, 2023

Copy link
Copy Markdown
Member

I have verified locally that enabling reflection makes the test pass in AOT.

Fix #89195.

@ghost

ghost commented Jul 21, 2023

Copy link
Copy Markdown

Tagging subscribers to this area: @dotnet/area-system-text-json, @gregsdennis
See info in area-owners.md if you want to be subscribed.

Issue Details

Fix #89195.

Author: eiriktsarpalis
Assignees: -
Labels:

area-System.Text.Json

Milestone: -

@eiriktsarpalis eiriktsarpalis added this to the 8.0.0 milestone Jul 21, 2023

@eerhardt eerhardt left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM. Have we thought about how we are testing in AOT with JsonSerializerIsReflectionEnabledByDefault=false (which is the default for AOT)?

@eiriktsarpalis

Copy link
Copy Markdown
Member Author

Have we thought about how we are testing in AOT with JsonSerializerIsReflectionEnabledByDefault=false (which is the default for AOT)?

At some point we'd need to refactor the test suite so that reflection vs. non-reflection components are adequately segregated. The tests happen to work in AOT currently because this declaration ensures the right generic specializations are included with the app, so re-enabling reflection seemed like the simplest way to make tests green again.

@eiriktsarpalis
eiriktsarpalis merged commit 6db5113 into dotnet:main Jul 21, 2023
@eiriktsarpalis
eiriktsarpalis deleted the fix/httpclient-json-aot-tests branch July 21, 2023 16:55
@ghost ghost locked as resolved and limited conversation to collaborators Aug 20, 2023
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

[NativeAOT] Test failures in System.Net.Http.Json.Unit.Tests

2 participants