You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@lucene.apache.org by Chris Hostetter <ho...@fucit.org> on 2016/07/06 17:11:19 UTC

confused by test runner option: -Dtests.awaitsfix=true

Over in SOLR-9180 i've worked up a patch with a bunch of new tests, some 
of which are disabled via @AwaitsFix because of bugs i uncovered while 
writting them that i wanted to go back and reinvestivate later. 
Example...

   public void testAugmenters() throws Exception {
     ...
   }

   @AwaitsFix(bugUrl="nocommit: need blocker bug (inconsistent docid augmenter with committed/uncommited RTG)")
   public void testDocIdAugmenterRTG() throws Exception {
     ...
   }


...because of the annotations, the tests (as expected) pass with 
ignored/assumptions noted...

    $ ant test -Dtests.class=\*PseudoReturn\*
       ...
    [junit4] Tests summary: 2 suites, 58 tests, 18 ignored (18 assumptions)


I *thought* i could use -Dtests.awaitsfix=true to then run those same 
tests including all of the methods annotated with @AwaitsFix -- but that 
just gives the same (unexpected) success result...

    $ ant test -Dtests.awaitsfix=true -Dtests.class=\*PseudoReturn\*
      ...
    [junit4] Tests summary: 2 suites, 58 tests, 18 ignored (18 assumptions)



...is there a bug in the test runner, or am I missunderstanding the point 
of -Dtests.awaitsfix=true ?




-Hoss
http://www.lucidworks.com/

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


Re: confused by test runner option: -Dtests.awaitsfix=true

Posted by Dawid Weiss <da...@gmail.com>.
Btw. please feel free to add tests.awaitsfix to the list of properties
in that syspropertyset too, of course! I just mentioned the filter as
a perhaps better solution (which should also make it to the
common-build's help section...)

Dawid

On Wed, Jul 6, 2016 at 7:27 PM, Dawid Weiss <da...@gmail.com> wrote:
>> I *thought* i could use -Dtests.awaitsfix=true to then run those same tests
>> including all of the methods annotated with @AwaitsFix
>
> Yes, a test group can be enabled or disabled selectively.
>
>>    $ ant test -Dtests.awaitsfix=true -Dtests.class=\*PseudoReturn\*
>>      ...
>>    [junit4] Tests summary: 2 suites, 58 tests, 18 ignored (18 assumptions)
>
> I suspect the property isn't passed to forked JVMs properly. Look at
> common-build.xml, Hoss, it contains stuff that gets passed from the
> environment to forked JVMs in the region surrounding:
>
> [...]
>             <!-- set whether or not nightly tests should run -->
>             <sysproperty key="tests.nightly" value="@{tests.nightly}"/>
>               <!-- set whether or not weekly tests should run -->
>             <sysproperty key="tests.weekly" value="@{tests.weekly}"/>
>             <!-- set whether or not monster tests should run -->
>             <sysproperty key="tests.monster" value="@{tests.monster}"/>
>               <!-- set whether or not slow tests should run -->
>             <sysproperty key="tests.slow" value="@{tests.slow}"/>
> [...]
>
> and, better yet:
>
>             <!-- Only pass these to the test JVMs if defined in ANT. -->
>             <syspropertyset>
>                 <propertyref prefix="tests.maxfailures" />
>                 <propertyref prefix="tests.failfast" />
>                 <propertyref prefix="tests.badapples" />
>                 <propertyref prefix="tests.bwcdir" />
>                 <propertyref prefix="tests.timeoutSuite" />
>                 <propertyref prefix="tests.disableHdfs" />
>                 <propertyref prefix="tests.filter" />
>                 <propertyref prefix="tests.leavetmpdir" />
>                 <propertyref prefix="tests.leaveTemporary" />
>                 <propertyref prefix="tests.leavetemporary" />
>                 <propertyref prefix="solr.test.leavetmpdir" />
>             </syspropertyset>
>
> The property should be added there. Alternatively, the "tests.filter"
> implements a simple Boolean language that would allow you to run only
> selected groups (or their boolean expressions). So, for example:
>
> ant -Dtests.filter="@awaitsfix"
>
> would run only tests belonging to @awaitsfix group.
>
> More complex stuff is also possible, like (example):
>
> ant -Dtests.filter="@nightly and not(@slow or @backwards)"
>
> Dawid
>
>>
>>
>>
>> ...is there a bug in the test runner, or am I missunderstanding the point of
>> -Dtests.awaitsfix=true ?
>>
>>
>>
>>
>> -Hoss
>> http://www.lucidworks.com/
>>
>> ---------------------------------------------------------------------
>> To unsubscribe, e-mail: dev-unsubscribe@lucene.apache.org
>> For additional commands, e-mail: dev-help@lucene.apache.org
>>

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


Re: confused by test runner option: -Dtests.awaitsfix=true

Posted by Dawid Weiss <da...@gmail.com>.
> I *thought* i could use -Dtests.awaitsfix=true to then run those same tests
> including all of the methods annotated with @AwaitsFix

Yes, a test group can be enabled or disabled selectively.

>    $ ant test -Dtests.awaitsfix=true -Dtests.class=\*PseudoReturn\*
>      ...
>    [junit4] Tests summary: 2 suites, 58 tests, 18 ignored (18 assumptions)

I suspect the property isn't passed to forked JVMs properly. Look at
common-build.xml, Hoss, it contains stuff that gets passed from the
environment to forked JVMs in the region surrounding:

[...]
            <!-- set whether or not nightly tests should run -->
            <sysproperty key="tests.nightly" value="@{tests.nightly}"/>
              <!-- set whether or not weekly tests should run -->
            <sysproperty key="tests.weekly" value="@{tests.weekly}"/>
            <!-- set whether or not monster tests should run -->
            <sysproperty key="tests.monster" value="@{tests.monster}"/>
              <!-- set whether or not slow tests should run -->
            <sysproperty key="tests.slow" value="@{tests.slow}"/>
[...]

and, better yet:

            <!-- Only pass these to the test JVMs if defined in ANT. -->
            <syspropertyset>
                <propertyref prefix="tests.maxfailures" />
                <propertyref prefix="tests.failfast" />
                <propertyref prefix="tests.badapples" />
                <propertyref prefix="tests.bwcdir" />
                <propertyref prefix="tests.timeoutSuite" />
                <propertyref prefix="tests.disableHdfs" />
                <propertyref prefix="tests.filter" />
                <propertyref prefix="tests.leavetmpdir" />
                <propertyref prefix="tests.leaveTemporary" />
                <propertyref prefix="tests.leavetemporary" />
                <propertyref prefix="solr.test.leavetmpdir" />
            </syspropertyset>

The property should be added there. Alternatively, the "tests.filter"
implements a simple Boolean language that would allow you to run only
selected groups (or their boolean expressions). So, for example:

ant -Dtests.filter="@awaitsfix"

would run only tests belonging to @awaitsfix group.

More complex stuff is also possible, like (example):

ant -Dtests.filter="@nightly and not(@slow or @backwards)"

Dawid

>
>
>
> ...is there a bug in the test runner, or am I missunderstanding the point of
> -Dtests.awaitsfix=true ?
>
>
>
>
> -Hoss
> http://www.lucidworks.com/
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: dev-unsubscribe@lucene.apache.org
> For additional commands, e-mail: dev-help@lucene.apache.org
>

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