Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix: Remove skip.surefire.tests mvn property #739

Merged
merged 1 commit into from
Aug 1, 2024
Merged

Conversation

wForget
Copy link
Member

@wForget wForget commented Jul 30, 2024

Which issue does this PR close?

Follow-up to #404

Closes #.

Rationale for this change

The skip.surefire.tests property introduced in #404 causes -DskipTests to not work for maven-surefire-plugin.

To skip only java tests we just add -Dtest=none.

What changes are included in this PR?

  • Remove skip.surefire.tests and set failIfNoSpecifiedTests to false for maven-surefire-plugin.
  • Update doc

How are these changes tested?

  1. test ./mvnw install -DskipTests -pl common

    before this pr (-DskipTests does not take effect):

    [INFO] --- surefire:3.1.0:test (default-test) @ comet-common-spark3.4_2.12 ---
    [INFO] Using auto detected provider org.apache.maven.surefire.junit4.JUnit4Provider
    [INFO] 
    [INFO] -------------------------------------------------------
    [INFO]  T E S T S
    [INFO] -------------------------------------------------------
    [INFO] Running org.apache.comet.parquet.TestColumnReader
    24/07/31 10:04:11 INFO core/src/lib.rs: Comet native library initialized
    [INFO] Tests run: 3, Failures: 0, Errors: 0, Skipped: 0, Time elapsed: 4.298 s - in org.apache.comet.parquet.TestColumnReader
    [INFO] Running org.apache.comet.parquet.TestFileReader
    [INFO] Tests run: 7, Failures: 0, Errors: 0, Skipped: 0, Time elapsed: 1.347 s - in org.apache.comet.parquet.TestFileReader
    [INFO] Running org.apache.comet.parquet.TestCometInputFile
    [INFO] Tests run: 1, Failures: 0, Errors: 0, Skipped: 0, Time elapsed: 0 s - in org.apache.comet.parquet.TestCometInputFile
    [INFO] 
    [INFO] Results:
    [INFO] 
    [INFO] Tests run: 11, Failures: 0, Errors: 0, Skipped: 0
    

    after this pr (-DskipTests takes effect):

    [INFO] --- surefire:3.1.0:test (default-test) @ comet-common-spark3.4_2.12 ---
    [INFO] Tests are skipped.
    
  2. test ./mvnw test -Dtest=none -Dsuites="org.apache.comet.CometCastSuite valid"

    after this pr (works well and only executes the specified suites):

    [INFO] --- surefire:3.1.0:test (default-test) @ comet-common-spark3.4_2.12 ---
    [INFO] 
    [INFO] --- jacoco:0.8.11:report (report) @ comet-common-spark3.4_2.12 ---
    ......
    [INFO] --- scalatest:2.0.2:test (test) @ comet-spark-spark3.4_2.12 ---
    Run starting. Expected test count is: 2
    CometCastSuite:
    - all valid cast combinations covered (127 milliseconds)
    24/07/31 10:12:19 INFO core/src/lib.rs: Comet native library initialized
    - cast BinaryType to StringType - valid UTF-8 inputs (12 seconds, 452 milliseconds)
    Run completed in 17 seconds, 535 milliseconds.
    Total number of tests run: 2
    Suites: completed 1, aborted 0
    Tests: succeeded 2, failed 0, canceled 0, ignored 0, pending 0
    All tests passed.
    

@viirya
Copy link
Member

viirya commented Jul 30, 2024

cc @edmondop

@edmondop
Copy link
Contributor

I am not sure what's the problem, can you see the original comment from @andygrove on the merged Pr?

@wForget
Copy link
Member Author

wForget commented Jul 31, 2024

I am not sure what's the problem, can you see the original comment from @andygrove on the merged Pr?

I updated How are these changes tested? to show how to reproduce this issue.

@Kimahriman
Copy link
Contributor

I was also very confused why -DskipTests wasn't skipping the tests

Copy link
Contributor

@edmondop edmondop left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks good, thank you.

@viirya viirya merged commit d8e0d1f into apache:main Aug 1, 2024
76 checks passed
@viirya
Copy link
Member

viirya commented Aug 1, 2024

Thanks @wForget

himadripal pushed a commit to himadripal/datafusion-comet that referenced this pull request Sep 7, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants