vibhatha commented on code in PR #42158:
URL: https://github.com/apache/arrow/pull/42158#discussion_r1644465532


##########
java/flight/flight-sql-jdbc-core/src/test/java/org/apache/arrow/driver/jdbc/accessor/impl/binary/ArrowFlightJdbcBinaryVectorAccessorTest.java:
##########
@@ -73,61 +67,57 @@ public class ArrowFlightJdbcBinaryVectorAccessorTest {
           };
 
   private final 
AccessorTestUtils.AccessorIterator<ArrowFlightJdbcBinaryVectorAccessor>
-      accessorIterator = new AccessorTestUtils.AccessorIterator<>(collector, 
accessorSupplier);
-
-  @Parameterized.Parameters(name = "{1}")
-  public static Collection<Object[]> data() {
-    return Arrays.asList(
-        new Object[][] {
-          {
-            (Supplier<ValueVector>) () -> 
rootAllocatorTestRule.createVarBinaryVector(),
-            "VarBinaryVector"
-          },
-          {
-            (Supplier<ValueVector>) () -> 
rootAllocatorTestRule.createLargeVarBinaryVector(),
-            "LargeVarBinaryVector"
-          },
-          {
-            (Supplier<ValueVector>) () -> 
rootAllocatorTestRule.createFixedSizeBinaryVector(),
-            "FixedSizeBinaryVector"
-          },
-        });
-  }
-
-  public ArrowFlightJdbcBinaryVectorAccessorTest(
-      Supplier<ValueVector> vectorSupplier, String vectorType) {
-    this.vectorSupplier = vectorSupplier;
+      accessorIterator = new 
AccessorTestUtils.AccessorIterator<>(accessorSupplier);
+
+  public static Stream<Arguments> data() {
+    return Stream.of(
+        Arguments.of(
+            (Supplier<ValueVector>) () -> 
rootAllocatorTestExtension.createVarBinaryVector(),
+            "VarBinaryVector"),
+        Arguments.of(
+            (Supplier<ValueVector>) () -> 
rootAllocatorTestExtension.createLargeVarBinaryVector(),
+            "LargeVarBinaryVector"),
+        Arguments.of(
+            (Supplier<ValueVector>) () -> 
rootAllocatorTestExtension.createFixedSizeBinaryVector(),
+            "FixedSizeBinaryVector"));
   }
 
-  @Before
-  public void setup() {
+  public void setup(Supplier<ValueVector> vectorSupplier) {
     this.vector = vectorSupplier.get();
   }
 
-  @After
+  @AfterEach
   public void tearDown() {
     this.vector.close();
   }
 
-  @Test
-  public void testShouldGetStringReturnExpectedString() throws Exception {
+  @ParameterizedTest
+  @MethodSource("data")
+  public void testShouldGetStringReturnExpectedString(Supplier<ValueVector> 
vectorSupplier)
+      throws Exception {
+    setup(vectorSupplier);

Review Comment:
   So we have to call this function in each test method? 



-- 
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]

Reply via email to