You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@avro.apache.org by GitBox <gi...@apache.org> on 2022/07/21 19:37:14 UTC

[GitHub] [avro] timtebeek commented on pull request #1769: AVRO-3579: Migrate tests to JUnit5

timtebeek commented on PR #1769:
URL: https://github.com/apache/avro/pull/1769#issuecomment-1191861304

   Are you aware of the OpenRewrite recipes to [migrate to JUnit 5 from JUnit 4](https://docs.openrewrite.org/tutorials/migrate-from-junit-4-to-junit-5)?
   
   You can either run a command like the following in `lang/java`:
   
       mvn org.openrewrite.maven:rewrite-maven-plugin:4.26.0:run \
           -Drewrite.recipeArtifactCoordinates=org.openrewrite.recipe:rewrite-testing-frameworks:1.24.0 \
           -DactiveRecipes=org.openrewrite.java.testing.junit5.JUnit5BestPractices
   
   Or run the same recipes through https://public.moderne.io/organizations/apache/avro/master
   
   It takes a minute or two on my machine to modify over two hundred files such as:
   
   	modified:   android/src/test/java/org/apache/avro/util/internal/TestClassValueCache.java
   	modified:   avro/src/test/java/org/apache/avro/TestCircularReferences.java
   	modified:   avro/src/test/java/org/apache/avro/TestDataFileConcat.java
           ...
   	modified:   compiler/src/test/java/org/apache/avro/compiler/idl/DocCommentHelperTest.java
   	modified:   compiler/src/test/java/org/apache/avro/compiler/idl/TestCycle.java
   	modified:   compiler/src/test/java/org/apache/avro/compiler/idl/TestIdl.java
   	...
   	modified:   grpc/src/test/java/org/apache/avro/grpc/TestAvroMarshaller.java
   	modified:   grpc/src/test/java/org/apache/avro/grpc/TestAvroProtocolGrpc.java
   	modified:   integration-test/codegen-test/src/test/java/org/apache/avro/codegentest/AbstractSpecificRecordTest.java
   	modified:   integration-test/codegen-test/src/test/java/org/apache/avro/codegentest/TestCustomConversion.java
   	modified:   integration-test/codegen-test/src/test/java/org/apache/avro/codegentest/TestLogicalTypeForStringType.java
   	...
   	modified:   ipc-jetty/src/test/java/org/apache/avro/ipc/jetty/TestBulkData.java
   	modified:   ipc-jetty/src/test/java/org/apache/avro/ipc/jetty/TestProtocolHttp.java
   	modified:   ipc-jetty/src/test/java/org/apache/avro/ipc/jetty/TestStatsPluginAndServlet.java
   	modified:   ipc-netty/src/test/java/org/apache/avro/ipc/netty/TestNettyServer.java
   	modified:   ipc-netty/src/test/java/org/apache/avro/ipc/netty/TestNettyServerConcurrentExecution.java
   	modified:   ipc-netty/src/test/java/org/apache/avro/ipc/netty/TestNettyServerWithCallbacks.java
   	...
   	modified:   ipc/src/test/java/org/apache/avro/DataFileInteropTest.java
   	modified:   ipc/src/test/java/org/apache/avro/RPCMetaTestPlugin.java
   	modified:   ipc/src/test/java/org/apache/avro/TestCompare.java
   	...
   	modified:   mapred/src/test/java/org/apache/avro/hadoop/file/TestHadoopCodecFactory.java
   	modified:   mapred/src/test/java/org/apache/avro/hadoop/file/TestSortedKeyValueFile.java
   	modified:   mapred/src/test/java/org/apache/avro/hadoop/io/TestAvroDatumConverterFactory.java
   	...
   	modified:   maven-plugin/pom.xml
   	modified:   maven-plugin/src/test/java/org/apache/avro/mojo/AbstractAvroMojoTest.java
   	modified:   maven-plugin/src/test/java/org/apache/avro/mojo/TestIDLProtocolMojo.java
   	modified:   maven-plugin/src/test/java/org/apache/avro/mojo/TestInduceMojo.java
   	modified:   maven-plugin/src/test/java/org/apache/avro/mojo/TestProtocolMojo.java
   	modified:   maven-plugin/src/test/java/org/apache/avro/mojo/TestSchemaMojo.java
   	modified:   pom.xml
   	modified:   protobuf/src/test/java/org/apache/avro/protobuf/TestProtoConversions.java
   	modified:   protobuf/src/test/java/org/apache/avro/protobuf/TestProtobuf.java
   	modified:   thrift/src/test/java/org/apache/avro/thrift/TestThrift.java
   	modified:   tools/src/test/java/org/apache/avro/tool/TestCatTool.java
   	modified:   tools/src/test/java/org/apache/avro/tool/TestConcatTool.java
   	modified:   tools/src/test/java/org/apache/avro/tool/TestCreateRandomFileTool.java
   	...
   	modified:   trevni/avro/src/test/java/org/apache/trevni/avro/TestCases.java
   	modified:   trevni/avro/src/test/java/org/apache/trevni/avro/TestEvolvedSchema.java
   	modified:   trevni/avro/src/test/java/org/apache/trevni/avro/TestMetadataFiltering.java
   	...
   	modified:   trevni/core/src/test/java/org/apache/trevni/TestAllCodecs.java
   	modified:   trevni/core/src/test/java/org/apache/trevni/TestColumnFile.java
   	modified:   trevni/core/src/test/java/org/apache/trevni/TestIOBuffers.java
           ...
   
   One could even choose to adopt AssertJ at the same time for instance.
   
   And if you don't want to immediately commit such a large diff, you can choose to only commit certain modules or files separately.


-- 
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@avro.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org