nastra commented on code in PR #11444:
URL: https://github.com/apache/iceberg/pull/11444#discussion_r1830490735
##########
api/src/test/java/org/apache/iceberg/TestSchema.java:
##########
@@ -95,14 +140,21 @@ public void testUnsupportedInitialDefault(int
formatVersion) {
formatVersion);
}
- @Test
- public void testSupportedInitialDefault() {
- assertThatCode(() -> Schema.checkCompatibility(INITIAL_DEFAULT_SCHEMA, 3))
+ private static int[] testSupportedInitialDefault =
+ IntStream.rangeClosed(DEFAULT_VALUES_MIN_FORMAT_VERSION,
MAX_FORMAT_VERSION).toArray();
+
+ @ParameterizedTest
+ @FieldSource
+ public void testSupportedInitialDefault(int formatVersion) {
+ assertThatCode(() -> Schema.checkCompatibility(INITIAL_DEFAULT_SCHEMA,
formatVersion))
.doesNotThrowAnyException();
}
+ private static int[] testSupportedWriteDefault =
+ IntStream.rangeClosed(1, MAX_FORMAT_VERSION).toArray();
+
@ParameterizedTest
- @ValueSource(ints = {1, 2, 3})
+ @FieldSource
Review Comment:
```suggestion
@FieldSource(value = "supportedWriteDefault")
```
this makes it clearer which field parameters are actually being used. I
would also update all the others
--
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]