# Package org.apache.lucene.util

General test support.

See: Description

- Interface Summary
  Interface | Description
  --- | ---
  LuceneTestCase.ThrowingRunnable | A runnable that can throw any checked exception.
  TestRuleIgnoreTestSuites.NestedTestSuite | Marker interface for nested suites that should be ignored if executed in stand-alone mode.

- Class Summary
  Class | Description
  --- | ---
  BaseBitSetTestCase<T extends BitSet> | Base test case for BitSets.
  BaseDocIdSetTestCase<T extends DocIdSet> | Base test class for `DocIdSet`s.
  English | Converts numbers to english strings for testing.
  FailOnNonBulkMergesInfoStream | Hackidy-Häck-Hack to cause a test to fail on non-bulk merges
  FailureMarker | A `RunListener` that detects suite/ test failures.
  LineFileDocs | Minimal port of benchmark's LneDocSource + DocMaker, so tests can enum docs from a line file created by benchmark's WriteLineDoc task
  LuceneJUnit3MethodProvider | Backwards compatible test* method provider (public, non-static).
  LuceneTestCase | Base class for all Lucene unit tests, Junit3 or Junit4 variant.
  NullInfoStream | Prints nothing.
  QuickPatchThreadsFilter | Last minute patches.
  RamUsageTester | Crawls object graph to collect RAM usage for testing
  RamUsageTester.Accumulator | An accumulator of object references.
  Rethrow | Sneaky: rethrowing checked exceptions as unchecked ones.
  RunListenerPrintReproduceInfo | A suite listener printing a "reproduce string".
  TestRuleAssertionsRequired | Require assertions for Lucene/Solr packages.
  TestRuleIgnoreAfterMaxFailures | This rule keeps a count of failed tests (suites) and will result in an `AssumptionViolatedException` after a given number of failures for all tests following this condition.
  TestRuleIgnoreTestSuites | This rule will cause the suite to be assumption-ignored if the test class implements a given marker interface and a special property is not set.
  TestRuleLimitSysouts | This test rule serves two purposes: it fails the test if it prints too much to stdout and stderr (tests that chatter too much are discouraged) the rule ensures an absolute hard limit of stuff written to stdout and stderr to prevent accidental infinite loops from filling all available disk space with persisted output. The rule is not enforced for certain test types (see `TestRuleLimitSysouts.isEnforced()`).
  TestRuleMarkFailure | A rule for marking failed tests and suites.
  TestRuleRestoreSystemProperties | Restore a given set of system properties to a snapshot taken at the beginning of the rule.
  TestRuleStoreClassName | Stores the suite name so you can retrieve it from `TestRuleStoreClassName.getTestClass()`
  TestSecurityManager | A `SecurityManager` that prevents tests calling `System.exit(int)`.
  TestUtil | General utility methods for Lucene unit tests.
  ThrottledIndexOutput | Intentionally slow IndexOutput for testing.
  TimeUnits | time unit constants for use in annotations.

- Annotation Types Summary
  Annotation Type | Description
  --- | ---
  LuceneTestCase.AwaitsFix | Annotation for tests which exhibit a known issue and are temporarily disabled.
  LuceneTestCase.BadApple | Annotation for tests that fail frequently and are not executed in Jenkins builds to not spam mailing lists with false reports.
  LuceneTestCase.Monster | Annotation for monster tests that require special setup (e.g.
  LuceneTestCase.Nightly | Annotation for tests that should only be run during nightly builds.
  LuceneTestCase.Slow | Annotation for tests that are slow.
  LuceneTestCase.SuppressCodecs | Annotation for test classes that should avoid certain codec types (because they are expensive, for example).
  LuceneTestCase.SuppressFileSystems | Annotation for test classes that should avoid mock filesystem types (because they test a bug that only happens on linux, for example).
  LuceneTestCase.SuppressFsync | Annotation for test classes that should avoid always omit actual fsync calls from reaching the filesystem.
  LuceneTestCase.SuppressReproduceLine | Suppress the default `reproduce with: ant test...` Your own listener can be added as needed for your build.
  LuceneTestCase.SuppressSysoutChecks | Ignore `TestRuleLimitSysouts` for any suite which is known to print over the default limit of bytes to `System.out` or `System.err`.
  LuceneTestCase.SuppressTempFileChecks | Marks any suites which are known not to close all the temporary files.
  LuceneTestCase.Weekly | Annotation for tests that should only be run during weekly builds
  TestRuleLimitSysouts.Limit | An annotation specifying the limit of bytes per class.

## Package org.apache.lucene.util Description

General test support. The primary class is `LuceneTestCase`, which extends JUnit with additional functionality.

Copyright © 2000-2021 Apache Software Foundation. All Rights Reserved.