You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@lucene.apache.org by "Uwe Schindler (JIRA)" <ji...@apache.org> on 2014/09/04 08:46:51 UTC

[jira] [Comment Edited] (LUCENE-5920) tweak junit4 output options for 'ant beast'

    [ https://issues.apache.org/jira/browse/LUCENE-5920?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=14121014#comment-14121014 ] 

Uwe Schindler edited comment on LUCENE-5920 at 9/4/14 6:46 AM:
---------------------------------------------------------------

Hi Robert,
this cannot be fixed easily, the reason is that the statistics are initialized before the "-beast" target is invoked and the message printed after the "-beast" target. This is completely out of the scope of our groovy script.
I generally try the whole stuff first with a low beast.iter or simple ant test and later replace the beast count once I am sure it works.

bq. About your additional idea, i think we can do it, but I think we need to fix this check to happen on the first iteration?

The problem is: you get no output at all. If a test error happens you won't see it, too. You just see the BuildException, nothing more (I tried it with a fake failure). The main issue: You don't even see the reproduce line with seed.

We can do this if junit4 is fixed to make use of log levels. By default, Ant logs with level "WARN". If I allow minimum of WARN to be printed, I see everything. For minimum "ERROR" I see nothing (that is what "0" means when I tested it).

Unfortunately, Ant's API added log levels later, so for backwards compatibility it is not enforced to be given. And because of this every task around there just prints with default "WARN" level. The reason is also that you never see a difference in the output (e.g., Maven shows log level like any good logger does), but Ant ignores it completely in its output. These 2 facts make the log levels ignored by everyone creating tasks, including [~dweiss] (also the Ant people themselves don't care).

bq. If we fix this, we don't need any of the current output, just maybe a "." or some other kind of status bar to see progress.

We would then need to switch on/off on every iteration and print a single line log message (the beaster iteration, like we do currently). Printing all progress into one line is impossible with ANT. You must log whole lines.


was (Author: thetaphi):
Hi Robert,
this cannot be fixed easily, the reason is that the statistics are initialized before the "-beast" target is invoked and the message printed after the "-beast" target. This is completely out of the scope of our groovy script.
I generally try the whole stuff first with a low beast.iter or simple ant test and later replace the beast count once I am sure it works.

bq. About your additional idea, i think we can do it, but I think we need to fix this check to happen on the first iteration?

The problem is: you get no output at all. If a test error happens you won't see it, too. You just see the BuildException, nothing more (I tried it with a fake failure).

bq. If we fix this, we don't need any of the current output, just maybe a "." or some other kind of status bar to see progress.

We would then need to switch on/off on every iteration and print a single line log message (the beaster iteration, like we do currently). Printing all progress into one line is impossible with ANT. You must log whole lines.

> tweak junit4 output options for 'ant beast'
> -------------------------------------------
>
>                 Key: LUCENE-5920
>                 URL: https://issues.apache.org/jira/browse/LUCENE-5920
>             Project: Lucene - Core
>          Issue Type: Test
>            Reporter: Robert Muir
>             Fix For: 5.0, 4.11
>
>         Attachments: LUCENE-5920-silencer1.patch, LUCENE-5920.patch, LUCENE-5920.patch
>
>
> Currently, this outputs way too much, e.g. including all test output for every passing run (because this is the behavior when -Dtestcase is set).
> Especially with tests.verbose, this is really annoying as you have output from say 200 runs that you don't care about.
> I think ant beast should only show the interesting output for the failing run and try to suppress unnecessary output as much as possible for passing ones (it should be JUST enough to know your test ran and passed and not ignored, e.g. you didnt screw up).



--
This message was sent by Atlassian JIRA
(v6.3.4#6332)

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