Skip to content

Commit

Permalink
TESTING.asciidoc fix examples using forbidden annotation (#34515)
Browse files Browse the repository at this point in the history
Clean up examples not to use forbidden test annotation `@Nightly`.
remove references to unused annotations
  • Loading branch information
lipsill authored and alpar-t committed Oct 23, 2018
1 parent e17c805 commit 641a80b
Showing 1 changed file with 4 additions and 21 deletions.
25 changes: 4 additions & 21 deletions TESTING.asciidoc
Original file line number Diff line number Diff line change
Expand Up @@ -77,39 +77,24 @@ Run a single test case (variants)
./gradlew test "-Dtests.class=*.ClassName"
----------------------------------------------------------

Run all tests in a package and sub-packages
Run all tests in a package and its sub-packages

----------------------------------------------------
./gradlew test "-Dtests.class=org.elasticsearch.package.*"
----------------------------------------------------

Run any test methods that contain 'esi' (like: ...r*esi*ze...).
Run any test methods that contain 'esi' (like: ...r*esi*ze...)

-------------------------------
./gradlew test "-Dtests.method=*esi*"
-------------------------------

You can also filter tests by certain annotations ie:

* `@Nightly` - tests that only run in nightly builds (disabled by default)
* `@Backwards` - backwards compatibility tests (disabled by default)
* `@AwaitsFix` - tests that are waiting for a bugfix (disabled by default)
* `@BadApple` - tests that are known to fail randomly (disabled by default)

Those annotation names can be combined into a filter expression like:
Run all tests that are waiting for a bugfix (disabled by default)

------------------------------------------------
./gradlew test -Dtests.filter="@nightly and not @backwards"
./gradlew test -Dtests.filter=@awaitsfix
------------------------------------------------

to run all nightly test but not the ones that are backwards tests. `tests.filter` supports
the boolean operators `and, or, not` and grouping ie:


---------------------------------------------------------------
./gradlew test -Dtests.filter="@nightly and not(@badapple or @backwards)"
---------------------------------------------------------------

=== Seed and repetitions.

Run with a given seed (seed is a hex-encoded long).
Expand Down Expand Up @@ -160,8 +145,6 @@ Test groups can be enabled or disabled (true/false).
Default value provided below in [brackets].

------------------------------------------------------------------
./gradlew test -Dtests.nightly=[false] - nightly test group (@Nightly)
./gradlew test -Dtests.weekly=[false] - weekly tests (@Weekly)
./gradlew test -Dtests.awaitsfix=[false] - known issue (@AwaitsFix)
------------------------------------------------------------------

Expand Down

0 comments on commit 641a80b

Please sign in to comment.