You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@netbeans.apache.org by Antonio Vieiro <an...@vieiro.net> on 2017/10/02 17:33:44 UTC

Testing modules after review & licenses in test files?

Hi all,

A license header has already been included in an xml test file at [1]
(ide cluster, editor module). If I run tests on this module (cd
editor; ant test) the tests fail.

My questions:

a) Should I remove the license header from the test file?
b) If so, the test file would have an Oracle license (see [2]). Is this OK?
b) Is "(cd editor; ant test)" the proper way to test a module?

Thanks in advance and apologies for so many questions,
Antonio

[1] https://github.com/apache/incubator-netbeans/blob/master/editor/test/unit/src/org/netbeans/modules/editor/resources/annotations-test-layer.xml
[2] https://github.com/apache/incubator-netbeans/commit/6daa72c9819847bb4f71ee6aba6d30d5ffaca41a#diff-4af1caa76a12a7dce3d32c9063306622

Re: Testing modules after review & licenses in test files?

Posted by Jan Lahoda <la...@gmail.com>.
On Mon, Oct 2, 2017 at 8:11 PM, Emilian Bold <em...@gmail.com> wrote:

> AnnotationsTest and AnnotationLoadingTest are not failing on my machine.
>
> But PlainDocumentCompatibilityRandomTest.test and
> NbEditorToolBarTest.testActionContextLookupContainsNodeOnlyOnce *do* fail
> on my machine.
>

I see those two failing as well.

I think it is good to run tests with the
-Dtest-unit-sys-prop.ignore.random.failures=true flag (this will/should
ignore tests marked with @RandomlyFails):
ant -Dtest-unit-sys-prop.ignore.random.failures=true test

Overall, I don't think it is a good idea to revert changes to licence
headers because of failing tests - better fix (or ignore/disable) the test.
(In some cases, it might be OK to remove the header altogether, but putting
the old one back does not sound correct.)

Jan


>
> --emi
>
> On Mon, Oct 2, 2017 at 8:58 PM, Antonio Vieiro <an...@vieiro.net> wrote:
>
> > I restored the xml test file to the Oracle headers but the tests keep
> > on failing.
> >
> > So the Apache license headers are not the reason of the failure. I'll
> > keep those and keep going.
> >
> > TIA
> > Antonio
> >
>

Re: Testing modules after review & licenses in test files?

Posted by Emilian Bold <em...@gmail.com>.
AnnotationsTest and AnnotationLoadingTest are not failing on my machine.

But PlainDocumentCompatibilityRandomTest.test and
NbEditorToolBarTest.testActionContextLookupContainsNodeOnlyOnce *do* fail
on my machine.

--emi

On Mon, Oct 2, 2017 at 8:58 PM, Antonio Vieiro <an...@vieiro.net> wrote:

> I restored the xml test file to the Oracle headers but the tests keep
> on failing.
>
> So the Apache license headers are not the reason of the failure. I'll
> keep those and keep going.
>
> TIA
> Antonio
>

Re: Testing modules after review & licenses in test files?

Posted by Antonio Vieiro <an...@vieiro.net>.
I restored the xml test file to the Oracle headers but the tests keep
on failing.

So the Apache license headers are not the reason of the failure. I'll
keep those and keep going.

TIA
Antonio

Re: Testing modules after review & licenses in test files?

Posted by Emilian Bold <em...@gmail.com>.
http://www.apache.org/legal/src-headers.html#faq-exceptions

Other files may make sense to have no license header. Three examples are:
>


Test data for which the addition of a source header would cause the tests
> to fail.



--emi

On Mon, Oct 2, 2017 at 8:33 PM, Antonio Vieiro <an...@vieiro.net> wrote:

> Hi all,
>
> A license header has already been included in an xml test file at [1]
> (ide cluster, editor module). If I run tests on this module (cd
> editor; ant test) the tests fail.
>
> My questions:
>
> a) Should I remove the license header from the test file?
> b) If so, the test file would have an Oracle license (see [2]). Is this OK?
> b) Is "(cd editor; ant test)" the proper way to test a module?
>
> Thanks in advance and apologies for so many questions,
> Antonio
>
> [1] https://github.com/apache/incubator-netbeans/blob/
> master/editor/test/unit/src/org/netbeans/modules/editor/
> resources/annotations-test-layer.xml
> [2] https://github.com/apache/incubator-netbeans/commit/
> 6daa72c9819847bb4f71ee6aba6d30d5ffaca41a#diff-
> 4af1caa76a12a7dce3d32c9063306622
>

goldenfiles (was Re: Testing modules after review & licenses in test files?)

Posted by Antonio <an...@vieiro.net>.

On 02/10/17 19:59, Matthias Bläsing wrote:
> Am Montag, den 02.10.2017, 19:33 +0200 schrieb Antonio Vieiro:
> 
> Are you sure the added header causes the test to fail? From the look of
> the file I doubt that. If it is indeed the header that causes the

The licenses in headers have nothing to do with unit test failures.

Some golden files have also been modified with a new license ([1]) and 
may cause qa-test failures (this is the editor module, after all,  and 
may use text-specific positions for tests).

I think running qa-tests requires a special setup, right? So I cannot 
qa-test the module. I'll mark it as "needs further testing" after the 
review, or should I add an issue for these failing tests?

Thanks,
Antonio

[1] 
https://github.com/apache/incubator-netbeans/blob/master/editor/test/qa-functional/data/goldenfiles/org/netbeans/test/editor/general/GeneralTypingTest/testJavaEnterBeginAndEnd.pass



Re: Testing modules after review & licenses in test files?

Posted by Matthias Bläsing <mb...@doppel-helix.eu>.
Am Montag, den 02.10.2017, 19:33 +0200 schrieb Antonio Vieiro:
> A license header has already been included in an xml test file at [1]
> (ide cluster, editor module). If I run tests on this module (cd
> editor; ant test) the tests fail.
> 
> My questions:
> 
> a) Should I remove the license header from the test file?

Are you sure the added header causes the test to fail? From the look of
the file I doubt that. If it is indeed the header that causes the
problem I revert the header adjustment and add an jira issue about that
and reference that in the comments.

> b) If so, the test file would have an Oracle license (see [2]). Is this OK?

My understanding is: No - the code was donated by oracle to the Apache
foundation and so it should be ALv2 licesed.

> b) Is "(cd editor; ant test)" the proper way to test a module?

That should work.

> [1] https://github.com/apache/incubator-netbeans/blob/master/editor/test/unit/src/org/netbeans/modules/editor/resources/annotations-test-layer.xml

Greetings

Matthias