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

docs: Running ScalaTest suites from the CLI #404

Merged
merged 3 commits into from
May 9, 2024
Merged

Conversation

edmondop
Copy link
Contributor

@edmondop edmondop commented May 8, 2024

As discussed in the Discord channel, some developers have setup that relies on the CLI to execute single tests.

When using only ScalaTest variables to select a suite, modules that do not use scalaTest but uses maven-surefire-plugin runs all the tests, which is not desirable sometime

@andygrove andygrove changed the title Docs docs: Running ScalaTest suites from the CLI May 8, 2024
README.md Outdated
Comment on lines 78 to 88
## Running ScalaTest suites from the CLI

Running single ScalaTest suites from the CLI is possible using the `suites`
argument, for example if you only want to execute the test cases that contains *valid*
in their name in `org.apache.comet.CometCastSuite` you can use

```sh
mvn test -Dsuites="org.apache.comet.CometCastSuite valid" -Dskip.surefire.tests=true
```

Other options for selecting specific suites are described in the [ScalaTest Maven Plugin documentation](https://www.scalatest.org/user_guide/using_the_scalatest_maven_plugin)
Copy link
Member

Choose a reason for hiding this comment

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

This is helpful content @edmondop but I think this needs to be in the development guide (part of the contributing guide linked to here in the README), which is published at https://datafusion.apache.org/comet/contributor-guide/development.html

The source is in this repo under docs/source/contributor-guide

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Fixed

Copy link
Member

@andygrove andygrove left a comment

Choose a reason for hiding this comment

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

Thanks @edmondop for the useful tip.

I tested with:

mvn test -Dsuites="org.apache.comet.CometCastSuite StringType" -Dskip.surefire.tests=true

and saw:

CometCastSuite:
24/05/08 22:25:48 INFO src/lib.rs: Comet native library initialized
- cast BooleanType to StringType (6 seconds, 511 milliseconds)
- cast ByteType to StringType (863 milliseconds)
- cast ShortType to StringType (749 milliseconds)
- cast IntegerType to StringType (745 milliseconds)
- cast LongType to StringType (651 milliseconds)
- cast FloatType to StringType (598 milliseconds)
- cast DoubleType to StringType (635 milliseconds)
- cast DecimalType(10,2) to StringType !!! IGNORED !!!
- cast StringType to BooleanType (706 milliseconds)
- cast StringType to ByteType (1 second, 388 milliseconds)
- cast StringType to ShortType (913 milliseconds)
- cast StringType to IntegerType (1 second, 15 milliseconds)
- cast StringType to LongType (995 milliseconds)
- cast StringType to FloatType !!! IGNORED !!!
- cast StringType to DoubleType !!! IGNORED !!!
- cast StringType to DecimalType(10,2) !!! IGNORED !!!
- cast StringType to BinaryType (573 milliseconds)
- cast StringType to DateType !!! IGNORED !!!
- cast StringType to TimestampType disabled by default (239 milliseconds)
- cast StringType to TimestampType !!! IGNORED !!!
- cast StringType to TimestampType disabled for non-UTC timezone (152 milliseconds)
- cast StringType to TimestampType - subset of supported values (1 second, 250 milliseconds)
- cast BinaryType to StringType !!! IGNORED !!!
- cast BinaryType to StringType - valid UTF-8 inputs (570 milliseconds)
- cast DateType to StringType (441 milliseconds)
- cast TimestampType to StringType (461 milliseconds)

@andygrove andygrove merged commit 1403380 into apache:main May 9, 2024
40 checks passed
himadripal pushed a commit to himadripal/datafusion-comet that referenced this pull request Sep 7, 2024
* Adding documentation to run single tests

* Removed empty newline

* Fixing README and development.md

---------

Co-authored-by: Edmondo Porcu <[email protected]>
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.

2 participants