Skip to content

fix(66900): Adding test for confirm bug fix. - #87167

Merged
eiriktsarpalis merged 1 commit into
dotnet:mainfrom
Maximys:bugfix/66900-invalid-processing-of-hidden-properties
Jun 16, 2023
Merged

eiriktsarpalis merged 1 commit into
dotnet:mainfrom
Maximys:bugfix/66900-invalid-processing-of-hidden-properties

Conversation

@Maximys

@Maximys Maximys commented Jun 6, 2023

Copy link
Copy Markdown
Contributor

Current PR simply adding test for confirm that my previous PR also make fixes for #66900

@ghost ghost added area-System.Text.Json community-contribution Indicates that the PR has been added by a community member labels Jun 6, 2023
@ghost

ghost commented Jun 6, 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

Current PR simply adding test for confirm that my previous PR also make fixes for #66900

Author: Maximys
Assignees: -
Labels:

area-System.Text.Json

Milestone: -

@eiriktsarpalis eiriktsarpalis self-assigned this Jun 6, 2023
@eiriktsarpalis eiriktsarpalis added this to the 8.0.0 milestone Jun 6, 2023
eiriktsarpalis
eiriktsarpalis previously approved these changes Jun 6, 2023

@eiriktsarpalis eiriktsarpalis 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.

Awesome!

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.

Could you

  1. Update the assertion to validate the content of the output.
  2. Validate that it deserializes back to the expected value?

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

Fixed by amend: 2d20edd

@eiriktsarpalis
eiriktsarpalis dismissed their stale review June 6, 2023 13:38

Pending feedback on tests.

@Maximys
Maximys force-pushed the bugfix/66900-invalid-processing-of-hidden-properties branch from c2fbafa to 2d20edd Compare June 7, 2023 05:32

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.

I thought I had left this feedback earlier, but I don't see it now. I don't believe this is the appropriate test suite for this type of test. Could you please move it to PropertyVisibilityTests.cs? Thanks

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

Moved by amend: a9ca71c

@eiriktsarpalis eiriktsarpalis added the needs-author-action An issue or pull request that requires more info or actions from the author. label Jun 14, 2023
@Maximys
Maximys force-pushed the bugfix/66900-invalid-processing-of-hidden-properties branch from 2d20edd to a9ca71c Compare June 15, 2023 04:56
@ghost ghost removed the needs-author-action An issue or pull request that requires more info or actions from the author. label Jun 15, 2023

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.

The test should run the same for both reflection and the source generator. Would it be possible to move the test to the base PropertyVisibilityTests class? Note that this would additionally require the following two changes:

  1. Replace any direct calls to JsonSerializer.Serialize/Deserialize with the Serializer.SerializeWrapper test abstraction.
  2. For the case of the source generator, add the test classes to the relevant JsonSerializerContext declaration.

Thanks!

@Maximys
Maximys force-pushed the bugfix/66900-invalid-processing-of-hidden-properties branch 2 times, most recently from fd54759 to c49cef7 Compare June 16, 2023 09:36
@Maximys
Maximys force-pushed the bugfix/66900-invalid-processing-of-hidden-properties branch from 6e3f009 to 68a426e Compare June 16, 2023 12:42

@eiriktsarpalis eiriktsarpalis 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.

Thanks!

@eiriktsarpalis

Copy link
Copy Markdown
Member

Test failures are due to #87680 and unrelated to this change.

@eiriktsarpalis
eiriktsarpalis merged commit 1981786 into dotnet:main Jun 16, 2023
@ghost ghost locked as resolved and limited conversation to collaborators Jul 16, 2023
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

area-System.Text.Json community-contribution Indicates that the PR has been added by a community member

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Serializing type which hides inherited property with both properties ignored throws ArgumentException

2 participants