This is an automated email from the ASF dual-hosted git repository.

etudenhoefner pushed a commit to branch fix-testpartitionspecparser
in repository https://gitbox.apache.org/repos/asf/iceberg.git

commit 86508a6e55ebfbe9bb8622b1c94838c31fd547db
Author: Eduard Tudenhoefner <[email protected]>
AuthorDate: Tue Jun 4 09:22:09 2024 +0200

    Core: Use TestTemplate instead of Test annotation in TestPartitionSpecParser
    
    I've noticed that the `formatVersion` parameter wasn't properly initialized 
for this test class because the tests weren't annotated with `@TestTemplate`
---
 .../test/java/org/apache/iceberg/TestPartitionSpecParser.java    | 9 +++++----
 1 file changed, 5 insertions(+), 4 deletions(-)

diff --git a/core/src/test/java/org/apache/iceberg/TestPartitionSpecParser.java 
b/core/src/test/java/org/apache/iceberg/TestPartitionSpecParser.java
index ad8861f536..3522db3da4 100644
--- a/core/src/test/java/org/apache/iceberg/TestPartitionSpecParser.java
+++ b/core/src/test/java/org/apache/iceberg/TestPartitionSpecParser.java
@@ -23,6 +23,7 @@ import static org.assertj.core.api.Assertions.assertThat;
 import java.util.Arrays;
 import java.util.List;
 import org.junit.jupiter.api.Test;
+import org.junit.jupiter.api.TestTemplate;
 import org.junit.jupiter.api.extension.ExtendWith;
 
 @ExtendWith(ParameterizedTestExtension.class)
@@ -32,7 +33,7 @@ public class TestPartitionSpecParser extends TestBase {
     return Arrays.asList(1);
   }
 
-  @Test
+  @TestTemplate
   public void testToJsonForV1Table() {
     String expected =
         "{\n"
@@ -69,7 +70,7 @@ public class TestPartitionSpecParser extends TestBase {
     assertThat(PartitionSpecParser.toJson(table.spec(), 
true)).isEqualTo(expected);
   }
 
-  @Test
+  @TestTemplate
   public void testFromJsonWithFieldId() {
     String specString =
         "{\n"
@@ -95,7 +96,7 @@ public class TestPartitionSpecParser extends TestBase {
     assertThat(spec.fields().get(1).fieldId()).isEqualTo(1000);
   }
 
-  @Test
+  @TestTemplate
   public void testFromJsonWithoutFieldId() {
     String specString =
         "{\n"
@@ -119,7 +120,7 @@ public class TestPartitionSpecParser extends TestBase {
     assertThat(spec.fields().get(1).fieldId()).isEqualTo(1001);
   }
 
-  @Test
+  @TestTemplate
   public void testTransforms() {
     for (PartitionSpec spec : PartitionSpecTestBase.SPECS) {
       assertThat(roundTripJSON(spec)).isEqualTo(spec);

Reply via email to