gaoyunhaii commented on code in PR #21736:
URL: https://github.com/apache/flink/pull/21736#discussion_r1105309145
##########
flink-test-utils-parent/flink-migration-test-utils/README.md:
##########
@@ -0,0 +1,93 @@
+# Add State Migration Tests
+
+This module is the tools that helps the state migration tests
+generate the snapshots of the current version before cutting branch.
+
+To add a state migration tests in one module, add the following dependency
+
+```xml
+
+<dependency>
+ <groupId>org.apache.flink</groupId>
+ <artifactId>fink-migration-test-utils</artifactId>
+ <version>${project.version}</version>
+ <scope>test</scope>
+</dependency>
+```
+
+and the following profile
+
+```xml
+<profile>
+ <id>generate-snapshots</id>
+ <activation>
+ <property>
+ <name>generate-snapshots</name>
+ </property>
+ </activation>
+ <build>
+ <plugins>
+ <plugin>
+ <artifactId>maven-antrun-plugin</artifactId>
+ <executions>
+ <execution>
+ <id>generate-snapshots</id>
+ <phase>package</phase>
+ <goals>
+ <goal>run</goal>
+ </goals>
+ <configuration>
+ <target>
+ <condition property="optional.classes"
value="--classes '${generate.classes}'"
+ else="">
+ <isset property="generate.classes"/>
+ </condition>
+ <condition property="optional.prefixes"
+ value="--prefixes
'${generate.prefixes}'" else="">
+ <isset property="generate.prefixes"/>
+ </condition>
+ <java
classname="org.apache.flink.test.migration.MigrationTestsSnapshotGenerator"
+ fork="true" failonerror="true"
dir="${project.basedir}">
+ <classpath refid="maven.test.classpath"/>
+ <arg value="--dir"/>
+ <arg line="${project.basedir}"/>
+ <arg value="--version"/>
+ <arg value="${generate.version}"/>
+ <arg line="${optional.classes}"/>
+ <arg line="${optional.prefixes}"/>
+ </java>
+ </target>
+ </configuration>
+ </execution>
+ </executions>
+ </plugin>
+ </plugins>
+ </build>
+</profile>
+```
+
+To show the log during generating, add
+
+```
+logger.migration.name = org.apache.flink.test.migration
+logger.migration.level = INFO
+```
+
+to the `log4j2-test.properties` of this module.
+
+The state migration tests should satisfy
+
+1. The tests are named like `*(Test|ITCase).(java|scala)`.
+2. The test class name is the same with the file name.
+3. The test implements `org.apache.flink.test.util.MigrationTest` and the
snapshots generator methods is labeled
Review Comment:
Perhaps it need to be changed to `methods are` since there are possibly
multiple methods?
--
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]