ebyhr commented on code in PR #13922:
URL: https://github.com/apache/iceberg/pull/13922#discussion_r2302846970
##########
spark/v4.0/spark/src/test/java/org/apache/iceberg/spark/sql/TestPartitionedWritesToWapBranch.java:
##########
@@ -82,6 +85,22 @@ public void testWapIdAndWapBranchCannotBothBeSetForWrite() {
"Cannot set both WAP ID and branch, but got ID [%s] and branch
[%s]", wapId, BRANCH);
}
+ @TestTemplate
+ public void testWapPropertiesSet() {
+ assertThatCode(
+ () -> {
+ sql("INSERT INTO %s VALUES (4, 'd')", tableName);
+ Table table = validationCatalog.loadTable(tableIdent);
+ assertThat(
+ table
+ .snapshot(table.refs().get(BRANCH).snapshotId())
+ .summary()
+ .get(SnapshotSummary.WAP_BRANCH_PROP))
+ .isEqualTo(BRANCH);
Review Comment:
We should use `AbstractMapAssert`'s methods for better failure messages:
```java
assertThat(table.snapshot(table.refs().get(BRANCH).snapshotId()).summary())
.containsEntry(SnapshotSummary.WAP_BRANCH_PROP, BRANCH);
```
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: [email protected]
For queries about this service, please contact Infrastructure at:
[email protected]
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]