Skip to content

test: prefab AttributeValue in DescribeTableEnhancedResponseTest#7059

Merged
zoewangg merged 1 commit into
masterfrom
zoewang/dynamodb-enhanced-equalsverifier-prefab
Jun 22, 2026
Merged

test: prefab AttributeValue in DescribeTableEnhancedResponseTest#7059
zoewangg merged 1 commit into
masterfrom
zoewang/dynamodb-enhanced-equalsverifier-prefab

Conversation

@zoewangg

Copy link
Copy Markdown
Contributor

Motivation and Context

DescribeTableEnhancedResponseTest.equalsHashcode uses EqualsVerifier on the DescribeTableEnhancedResponse wrapper, which delegates equals/hashCode to the low-level DescribeTableResponse. EqualsVerifier walks the full reachable type graph from DescribeTableResponse to synthesise representative values for every nested type.

If the low-level model gains a shape reachable from DescribeTableResponse that transitively exposes a Map<String, AttributeValue> or List<AttributeValue>, the graph becomes recursive: AttributeValue itself contains a Map<String, AttributeValue> (its M member) and a List<AttributeValue> (its L member). EqualsVerifier 3.15.1 detects the cycle and aborts the test with:

Recursive datastructure.
Add prefab values for one of the following types: ... AttributeValue.

Other tests in the same module already handle this exact issue by supplying AttributeValue prefab values to EqualsVerifier (see EqualsAndHashCodeTest, BatchWriteResultTest, TransactWriteItemsEnhancedResponseTest). This change applies the same idiom to DescribeTableEnhancedResponseTest so the test remains correct as the low-level model evolves.

Modifications

Updated test to add prefab values

Testing

Updated tests

Types of changes

  • Bug fix (non-breaking change which fixes an issue)
  • New feature (non-breaking change which adds functionality)

(Neither: this is a test-only robustness change with no customer-visible effect.)

Checklist

  • I have read the [CONTRIBUTING](https://github.com/aws/aws-sdk-java-v2/blob/master/CONTRIBUTING.md) document
  • Local run of mvn install succeeds (only the affected dynamodb-enhanced module was built; full-repo mvn install was not run)
  • My code follows the code style of this project
  • My change requires a change to the Javadoc documentation
  • I have updated the Javadoc documentation accordingly
  • I have added tests to cover my changes (the change IS to a test; no new behaviour to cover)
  • All new and existing tests passed
  • I have added a changelog entry (test-only change with no customer-facing impact; per the contribution guidelines, no changelog is required)
  • My change is to implement 1.11 parity feature

License

  • I confirm that this pull request can be released under the Apache 2 license

@zoewangg zoewangg requested a review from a team as a code owner June 22, 2026 00:22
@zoewangg zoewangg added this pull request to the merge queue Jun 22, 2026
Merged via the queue into master with commit c9b975b Jun 22, 2026
12 of 13 checks passed
@github-actions

Copy link
Copy Markdown

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.

@github-actions github-actions Bot locked as resolved and limited conversation to collaborators Jun 22, 2026
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants