You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@lucene.apache.org by GitBox <gi...@apache.org> on 2022/05/16 09:34:40 UTC

[GitHub] [lucene] mocobeta commented on a diff in pull request #893: LUCENE-10531: Run scripts test nightly only

mocobeta commented on code in PR #893:
URL: https://github.com/apache/lucene/pull/893#discussion_r873520231


##########
lucene/distribution.tests/src/test/org/apache/lucene/distribution/AbstractLuceneDistributionTest.java:
##########
@@ -47,6 +52,19 @@ public abstract class AbstractLuceneDistributionTest extends RandomizedTest {
   /** Resolved and validated {@link #DISTRIBUTION_PROPERTY}. */
   private static Path distributionPath;
 
+  // --------------------------------------------------------------------
+  // Test groups, system properties and other annotations modifying tests
+  // --------------------------------------------------------------------
+
+  public static final String SYSPROP_NIGHTLY = "tests.nightly";
+
+  /** Annotation for tests that should only be run during nightly builds. */
+  @Documented
+  @Inherited
+  @Retention(RetentionPolicy.RUNTIME)
+  @TestGroup(enabled = false, sysProperty = SYSPROP_NIGHTLY)
+  public @interface Nightly {}

Review Comment:
   Off-the-shelf `com.carrotsearch.randomizedtesting.annotations.Nightly` would be okay (`tests.nightly` system property is used for the test group [as default](https://github.com/randomizedtesting/randomizedtesting/blob/8be8a09e3b3bf1a57947d5367a1afe68322ac4dc/randomized-runner/src/main/java/com/carrotsearch/randomizedtesting/annotations/TestGroup.java#L55)), but I re-defined `Nightly` annotation here as `LuceneTestCase` does so.



-- 
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: issues-unsubscribe@lucene.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


---------------------------------------------------------------------
To unsubscribe, e-mail: issues-unsubscribe@lucene.apache.org
For additional commands, e-mail: issues-help@lucene.apache.org