You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@parquet.apache.org by "nastra (via GitHub)" <gi...@apache.org> on 2026/07/17 05:55:56 UTC
[PR] GH-3618: Migrate multiple modules to JUnit5 [parquet-java]
nastra opened a new pull request, #3673:
URL: https://github.com/apache/parquet-java/pull/3673
<!--
Thanks for opening a pull request!
If you're new to Parquet-Java, information on how to contribute can be found here: https://parquet.apache.org/docs/contribution-guidelines/contributing
Please open a GitHub issue for this pull request: https://github.com/apache/parquet-java/issues/new/choose
and format pull request title as below:
GH-${GITHUB_ISSUE_ID}: ${SUMMARY}
or simply use the title below if it is a minor issue:
MINOR: ${SUMMARY}
-->
### Rationale for this change
Now that these modules have been migrated to AssertJ assertions, migrating them to JUnit5 is trivial and mostly requires import changes
### What changes are included in this PR?
### Are these changes tested?
yes
### Are there any user-facing changes?
no
<!-- Please uncomment the line below and replace ${GITHUB_ISSUE_ID} with the actual Github issue id. -->
<!-- Closes #${GITHUB_ISSUE_ID} -->
--
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: issues-unsubscribe@parquet.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
---------------------------------------------------------------------
To unsubscribe, e-mail: issues-unsubscribe@parquet.apache.org
For additional commands, e-mail: issues-help@parquet.apache.org
Re: [PR] GH-3618: Migrate multiple modules to JUnit5 [parquet-java]
Posted by "nastra (via GitHub)" <gi...@apache.org>.
nastra commented on code in PR #3673:
URL: https://github.com/apache/parquet-java/pull/3673#discussion_r3600794203
##########
parquet-avro/src/test/java/org/apache/parquet/avro/TestReadWriteOldListBehavior.java:
##########
@@ -53,32 +52,23 @@
import org.apache.parquet.io.api.Binary;
import org.apache.parquet.io.api.RecordConsumer;
import org.apache.parquet.schema.MessageTypeParser;
-import org.junit.Test;
-import org.junit.runner.RunWith;
-import org.junit.runners.Parameterized;
+import org.junit.jupiter.params.ParameterizedTest;
+import org.junit.jupiter.params.provider.ValueSource;
-@RunWith(Parameterized.class)
Review Comment:
JUnit5 doesn't have class-level parameterization unfortunately, so everything is parameterized at the method level
--
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: issues-unsubscribe@parquet.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
---------------------------------------------------------------------
To unsubscribe, e-mail: issues-unsubscribe@parquet.apache.org
For additional commands, e-mail: issues-help@parquet.apache.org
Re: [PR] GH-3618: Migrate multiple modules to JUnit5 [parquet-java]
Posted by "nastra (via GitHub)" <gi...@apache.org>.
nastra commented on code in PR #3673:
URL: https://github.com/apache/parquet-java/pull/3673#discussion_r3600740306
##########
parquet-column/src/test/java/org/apache/parquet/column/values/delta/benchmark/BenchmarkReadingRandomIntegers.java:
##########
@@ -33,10 +33,12 @@
import org.apache.parquet.column.values.delta.DeltaBinaryPackingValuesWriterForInteger;
import org.apache.parquet.column.values.rle.RunLengthBitPackingHybridValuesReader;
import org.apache.parquet.column.values.rle.RunLengthBitPackingHybridValuesWriter;
-import org.junit.BeforeClass;
import org.junit.Rule;
-import org.junit.Test;
+import org.junit.jupiter.api.BeforeAll;
+import org.junit.jupiter.api.Test;
+import org.junit.jupiter.migrationsupport.rules.EnableRuleMigrationSupport;
+@EnableRuleMigrationSupport
Review Comment:
these JUnit benchmarks depend on `com.carrotsearch.junitbenchmarks.BenchmarkRule` which is only available for JUnit4, so we can't really convert that Rule to JUnit5. We're making sure that this uses JUnit5 imports but runs with the migration module, which supports JUnit4 rule execution
--
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: issues-unsubscribe@parquet.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
---------------------------------------------------------------------
To unsubscribe, e-mail: issues-unsubscribe@parquet.apache.org
For additional commands, e-mail: issues-help@parquet.apache.org
Re: [PR] GH-3618: Migrate multiple modules to JUnit5 [parquet-java]
Posted by "nastra (via GitHub)" <gi...@apache.org>.
nastra commented on code in PR #3673:
URL: https://github.com/apache/parquet-java/pull/3673#discussion_r3601290074
##########
parquet-common/src/test/java/org/apache/parquet/bytes/TestDeprecatedBufferInputStream.java:
##########
@@ -22,141 +22,191 @@
import java.nio.ByteBuffer;
import java.util.ArrayList;
-import java.util.Arrays;
import java.util.List;
-import org.junit.Test;
-import org.junit.runner.RunWith;
-import org.junit.runners.Parameterized;
-import org.junit.runners.Parameterized.Parameter;
-import org.junit.runners.Parameterized.Parameters;
+import org.junit.jupiter.api.Nested;
+import org.junit.jupiter.api.Test;
/**
* Tests the deprecated behavior of instantiating ByteBufferInputStream directly
*/
-@RunWith(Parameterized.class)
-public class TestDeprecatedBufferInputStream extends TestByteBufferInputStreams {
- @Parameter(0)
- public ByteBuffer data;
-
- @Parameter(1)
- public Integer offset;
-
- @Parameters
- public static List<Object[]> parameters() {
Review Comment:
this refactors the test slightly to have nested test classes that use their own parameters
--
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: issues-unsubscribe@parquet.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
---------------------------------------------------------------------
To unsubscribe, e-mail: issues-unsubscribe@parquet.apache.org
For additional commands, e-mail: issues-help@parquet.apache.org
Re: [PR] GH-3618: Migrate multiple modules to JUnit5 [parquet-java]
Posted by "wgtmac (via GitHub)" <gi...@apache.org>.
wgtmac merged PR #3673:
URL: https://github.com/apache/parquet-java/pull/3673
--
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: issues-unsubscribe@parquet.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
---------------------------------------------------------------------
To unsubscribe, e-mail: issues-unsubscribe@parquet.apache.org
For additional commands, e-mail: issues-help@parquet.apache.org
Re: [PR] GH-3618: Migrate multiple modules to JUnit5 [parquet-java]
Posted by "nastra (via GitHub)" <gi...@apache.org>.
nastra commented on PR #3673:
URL: https://github.com/apache/parquet-java/pull/3673#issuecomment-5000288114
/cc @Fokko @wgtmac
--
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: issues-unsubscribe@parquet.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
---------------------------------------------------------------------
To unsubscribe, e-mail: issues-unsubscribe@parquet.apache.org
For additional commands, e-mail: issues-help@parquet.apache.org