I think I remember now... So, this is LuceneTestCase:

  /**
   * True if and only if tests are run in verbose mode. If this flag is
false tests are not expected
   * to print any messages. Enforced with {@link TestRuleLimitSysouts}.
   */
  public static final boolean VERBOSE =
systemPropertyAsBoolean("tests.verbose", false);

  /** Enables or disables dumping of {@link InfoStream} messages. */
  public static final boolean INFOSTREAM =
systemPropertyAsBoolean("tests.infostream", VERBOSE);

Note infostream is by default on when verbose is enabled. You can turn it
off independently though (-Ptests.infostream=false) or even set the default
in your gradle.properties...

So I don't think there's anything to do here? For the record, all the test
options and their defaults are displayed with:

gradlew -p lucene\core testOpts

Dawid

On Tue, Dec 12, 2023 at 8:45 PM Michael McCandless <
luc...@mikemccandless.com> wrote:

> Ahh thanks for the quick explanation and temporary solution Dawid!.
> Naming is the hardest part :)
>
> I think long ago we used to call it "-Dtests.stdout=true" or so?  Not the
> greatest name tho.  Maybe "tests.liveConsoleOut"?  "tests.liveConsole"?
>
> Mike McCandless
>
> http://blog.mikemccandless.com
>
>
> On Tue, Dec 12, 2023 at 2:31 PM Dawid Weiss <dawid.we...@gmail.com> wrote:
>
>>
>> This is actually an accidental (?) clash between Lucene's system property
>> and what's in defaults-tests.gradle.
>> You can manually prepend true || ... to the following in
>> defaults-tests.gradle.
>>
>>     def verboseMode = resolvedTestOption("tests.verbose").toBoolean()
>>
>> I can't remember why it aligns with Lucene's logger. Maybe it
>> should/could be a
>> separate property? I find it difficult to come up with a reasonable name
>> though.
>>
>> D.
>>
>> On Tue, Dec 12, 2023 at 8:03 PM Michael McCandless <
>> luc...@mikemccandless.com> wrote:
>>
>>> Hi Team,
>>>
>>> This is prolly a Dawid question...
>>>
>>> Sometimes I want to run a test (like a slow Monster test), seeing its
>>> ongoing musings popping out on the console in "real time" (not buffered).
>>>
>>> I can do this today by adding "-Dtests.verbose=true" to the ./gradlew
>>> invocation that's running the test.
>>>
>>> But that also turns on LuceneTestCase.VERBOSE which sometimes produces
>>> insane amounts of mostly not helpful content.
>>>
>>> Is there any way to do the first (stream console output) without the
>>> second (mega verbosity enabled)?
>>>
>>> Thanks,
>>>
>>> Mike McCandless
>>>
>>> http://blog.mikemccandless.com
>>>
>>

Reply via email to