test: prefab AttributeValue in DescribeTableEnhancedResponseTest#7059
Merged
Merged
Conversation
alextwoods
approved these changes
Jun 22, 2026
|
This pull request has been closed and the conversation has been locked. Comments on closed PRs are hard for our team to see. If you need more assistance, please open a new issue that references this one. |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to subscribe to this conversation on GitHub.
Already have an account?
Sign in.
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Motivation and Context
DescribeTableEnhancedResponseTest.equalsHashcodeuses EqualsVerifier on theDescribeTableEnhancedResponsewrapper, which delegatesequals/hashCodeto the low-levelDescribeTableResponse. EqualsVerifier walks the full reachable type graph fromDescribeTableResponseto synthesise representative values for every nested type.If the low-level model gains a shape reachable from
DescribeTableResponsethat transitively exposes aMap<String, AttributeValue>orList<AttributeValue>, the graph becomes recursive:AttributeValueitself contains aMap<String, AttributeValue>(itsMmember) and aList<AttributeValue>(itsLmember). EqualsVerifier 3.15.1 detects the cycle and aborts the test with:Other tests in the same module already handle this exact issue by supplying
AttributeValueprefab values to EqualsVerifier (seeEqualsAndHashCodeTest,BatchWriteResultTest,TransactWriteItemsEnhancedResponseTest). This change applies the same idiom toDescribeTableEnhancedResponseTestso the test remains correct as the low-level model evolves.Modifications
Updated test to add prefab values
Testing
Updated tests
Types of changes
(Neither: this is a test-only robustness change with no customer-visible effect.)
Checklist
mvn installsucceeds (only the affecteddynamodb-enhancedmodule was built; full-repomvn installwas not run)License