wombatu-kun commented on code in PR #17145:
URL: https://github.com/apache/iceberg/pull/17145#discussion_r3555938572
##########
core/src/test/java/org/apache/iceberg/TestTrackingBuilder.java:
##########
@@ -31,6 +31,15 @@
class TestTrackingBuilder {
+ private static final Tracking SOURCE_TRACKING_ADDED =
+ new TrackingStruct(EntryStatus.ADDED, 42L, 10L, 10L, 43L, 1000L, null,
null);
+ private static final Tracking SOURCE_TRACKING_EXISTING =
+ new TrackingStruct(EntryStatus.ADDED, 42L, 10L, 10L, 43L, 1000L, null,
null);
Review Comment:
`SOURCE_TRACKING_EXISTING` is built with `EntryStatus.ADDED`, so it is
value-identical to `SOURCE_TRACKING_ADDED`, but it replaces
`sourceTrackingWithStatus(EntryStatus.EXISTING)` at both of its call sites.
Both tests still pass: `validateStatusTransition`
(TrackingBuilder.java:170-178) rejects only DELETED and REPLACED sources, and
neither test asserts on `source.status()`. The result is a silent coverage loss
- `testExistingToExistingIsAllowed` now exercises ADDED -> EXISTING, which
`testExistingBuilderPreservesSourceFields` already covers, and
`testExistingToTerminalTransitions` now exercises ADDED -> DELETED/REPLACED,
which `testDeleteUpdatesSnapshotIdAndPreservesRest` and
`testReplaceUpdatesSnapshotIdAndPreservesRest` already cover. Nothing in the
file exercises an EXISTING source any more.
Use `EntryStatus.EXISTING` here.
--
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]