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

JingsongLi pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/paimon.git


The following commit(s) were added to refs/heads/master by this push:
     new 25598ee2df [build] Add spark/flink profile activation in AGENTS.md 
(#8497)
25598ee2df is described below

commit 25598ee2dfa405c41a395fe8f6b366b7006bfeec
Author: Juntao Zhang <[email protected]>
AuthorDate: Tue Jul 7 21:12:05 2026 +0800

    [build] Add spark/flink profile activation in AGENTS.md (#8497)
    
    Document that Spark and Flink tests must be run with explicit Maven
    profiles (`-Pspark3`/`-Pspark4`/`-Pflink1`/`-Pflink2`). Without them,
    cross-version modules such as `paimon-spark-common` stay out of the
    Maven reactor and tests run against the stale jar from `~/.m2`.
---
 AGENTS.md | 16 ++++++++++++++--
 1 file changed, 14 insertions(+), 2 deletions(-)

diff --git a/AGENTS.md b/AGENTS.md
index 82798d7e7e..2e4ecff82e 100644
--- a/AGENTS.md
+++ b/AGENTS.md
@@ -21,8 +21,8 @@ Prefer running the narrowest tests.
 
 #### Java Tests (surefire)
 
-- Single method: `mvn -pl <module> -Dtest=TestClassName#methodName test`
-- Single class: `mvn -pl <module> -Dtest=TestClassName test`
+- Single method: `mvn -pl <module> -DwildcardSuites=none 
-Dtest=TestClassName#methodName test`
+- Single class: `mvn -pl <module> -DwildcardSuites=none -Dtest=TestClassName 
test`
 
 #### Scala Tests (scalatest)
 
@@ -34,6 +34,18 @@ mvn -pl paimon-spark/paimon-spark-ut -am -Pfast-build 
-DfailIfNoTests=false \
   -Dtest=none test
 ```
 
+#### Required Maven Profiles
+- Spark tests: add `-Pspark3` or `-Pspark4`
+- Flink tests: add `-Pflink1` or `-Pflink2`
+
+For example, run a Java test in the Spark UT with Spark 3:
+```shell
+mvn -pl paimon-spark/paimon-spark-ut -am -Pfast-build -Pspark3 \
+  -DwildcardSuites=none \
+  -DfailIfNoTests=false \
+  -Dtest=SparkChainTableITCase#testChainTable test
+```
+
 ### Local Iteration Speedup
 
 Use `-Pfast-build` to skip checkstyle, spotless, enforcer, and rat checks (not 
for final verification):

Reply via email to