You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@nifi.apache.org by Joe Skora <js...@gmail.com> on 2015/11/03 12:26:35 UTC

Avro tests are broken on Windows?

Is it just me or is anyone else getting test failures
in [nifi-avro-processors] on Windows7?

I haven't tracked down the cause, but in testing the ListFile processor I
started getting unit test failures in the [nifi-avro-processors].  I first
noticed them last night, but only on Windows not Linux.

The exact test failure is

> Failed tests:
>
>   TestConvertAvroToJSON.testMultipleAvroMessagesContainerNone:127
>> expected:<...vorite_color": null}[]
>
> ]"name": "George", ...> but was:<...vorite_color": null}[
>
> {"name": "George", ...>
>
>
I can dig further but I figured someone may know the cause before I spend
any cycles.  (I need to catch up on the dev list, so if the answer is there
just let me know.)

Regards,
Joe

Re: Avro tests are broken on Windows?

Posted by Tony Kurc <tr...@gmail.com>.
Pushed a patch to jira.

On Wed, Nov 4, 2015 at 1:01 PM, Tony Kurc <tr...@gmail.com> wrote:

> (https://issues.apache.org/jira/browse/NIFI-1106)
>
> On Wed, Nov 4, 2015 at 12:53 PM, Tony Kurc <tr...@gmail.com> wrote:
>
>> I have a windows environment set up, and I believe I'm the one that
>> pulled that PR in so I know the code, I'll give it a go. Joe - did you
>> submit a ticket?
>>
>> On Wed, Nov 4, 2015 at 12:41 PM, Sean Busbey <bu...@cloudera.com> wrote:
>>
>>> On Tue, Nov 3, 2015 at 8:58 AM, Bryan Bende <bb...@gmail.com> wrote:
>>> > I don't really have a way of trying this since I don't have a windows
>>> > machine, but I noticed that the processor writes a new line like this:
>>> >
>>> > System.lineSeparator().getBytes(StandardCharsets.UTF_8)
>>> >
>>> > but in the test it looks for "}\n{" so maybe if that \n was replaced
>>> with
>>> > System.lineSeparator() it would work??
>>> >
>>>
>>>
>>> Friendly reminder that all ASF committers have access to a free MSDN
>>> subscription, which includes Windows VM access:
>>>
>>>
>>> https://svn.apache.org/repos/private/committers/donated-licenses/msdn-subscription.html
>>>
>>> --
>>> Sean
>>>
>>
>>
>

Re: Avro tests are broken on Windows?

Posted by Tony Kurc <tr...@gmail.com>.
(https://issues.apache.org/jira/browse/NIFI-1106)

On Wed, Nov 4, 2015 at 12:53 PM, Tony Kurc <tr...@gmail.com> wrote:

> I have a windows environment set up, and I believe I'm the one that pulled
> that PR in so I know the code, I'll give it a go. Joe - did you submit a
> ticket?
>
> On Wed, Nov 4, 2015 at 12:41 PM, Sean Busbey <bu...@cloudera.com> wrote:
>
>> On Tue, Nov 3, 2015 at 8:58 AM, Bryan Bende <bb...@gmail.com> wrote:
>> > I don't really have a way of trying this since I don't have a windows
>> > machine, but I noticed that the processor writes a new line like this:
>> >
>> > System.lineSeparator().getBytes(StandardCharsets.UTF_8)
>> >
>> > but in the test it looks for "}\n{" so maybe if that \n was replaced
>> with
>> > System.lineSeparator() it would work??
>> >
>>
>>
>> Friendly reminder that all ASF committers have access to a free MSDN
>> subscription, which includes Windows VM access:
>>
>>
>> https://svn.apache.org/repos/private/committers/donated-licenses/msdn-subscription.html
>>
>> --
>> Sean
>>
>
>

Re: Avro tests are broken on Windows?

Posted by Tony Kurc <tr...@gmail.com>.
I have a windows environment set up, and I believe I'm the one that pulled
that PR in so I know the code, I'll give it a go. Joe - did you submit a
ticket?

On Wed, Nov 4, 2015 at 12:41 PM, Sean Busbey <bu...@cloudera.com> wrote:

> On Tue, Nov 3, 2015 at 8:58 AM, Bryan Bende <bb...@gmail.com> wrote:
> > I don't really have a way of trying this since I don't have a windows
> > machine, but I noticed that the processor writes a new line like this:
> >
> > System.lineSeparator().getBytes(StandardCharsets.UTF_8)
> >
> > but in the test it looks for "}\n{" so maybe if that \n was replaced with
> > System.lineSeparator() it would work??
> >
>
>
> Friendly reminder that all ASF committers have access to a free MSDN
> subscription, which includes Windows VM access:
>
>
> https://svn.apache.org/repos/private/committers/donated-licenses/msdn-subscription.html
>
> --
> Sean
>

Re: Avro tests are broken on Windows?

Posted by Sean Busbey <bu...@cloudera.com>.
On Tue, Nov 3, 2015 at 8:58 AM, Bryan Bende <bb...@gmail.com> wrote:
> I don't really have a way of trying this since I don't have a windows
> machine, but I noticed that the processor writes a new line like this:
>
> System.lineSeparator().getBytes(StandardCharsets.UTF_8)
>
> but in the test it looks for "}\n{" so maybe if that \n was replaced with
> System.lineSeparator() it would work??
>


Friendly reminder that all ASF committers have access to a free MSDN
subscription, which includes Windows VM access:

https://svn.apache.org/repos/private/committers/donated-licenses/msdn-subscription.html

-- 
Sean

Re: Avro tests are broken on Windows?

Posted by Joe Skora <js...@gmail.com>.
@Bryan, that makes sense, I can look at it tonight and test on
Linux/Windows/Mac for verify.  I'll put in a ticket for it.

On Tue, Nov 3, 2015 at 9:58 AM, Bryan Bende <bb...@gmail.com> wrote:

> I don't really have a way of trying this since I don't have a windows
> machine, but I noticed that the processor writes a new line like this:
>
> System.lineSeparator().getBytes(StandardCharsets.UTF_8)
>
> but in the test it looks for "}\n{" so maybe if that \n was replaced with
> System.lineSeparator() it would work??
>
> On Tue, Nov 3, 2015 at 6:41 AM, Toivo Adams <to...@gmail.com> wrote:
>
> > Same here, win7
> >
> > -------------------------------------------------------
> >  T E S T S
> > -------------------------------------------------------
> > Running org.apache.nifi.processors.avro.TestConvertAvroToJSON
> > Tests run: 4, Failures: 1, Errors: 0, Skipped: 0, Time elapsed: 0.421 sec
> > <<< FAILURE! - in org.apache.nifi.processors.avro.TestConvertAvroToJSON
> >
> >
> testMultipleAvroMessagesContainerNone(org.apache.nifi.processors.avro.TestConvertAvroToJSON)
> > Time elapsed: 0.01 sec  <<< FAILURE!
> > org.junit.ComparisonFailure: expected:<...vorite_color": null}[]
> > {"name": "George", ...> but was:<...vorite_color": null}[
> > ]
> > {"name": "George", ...>
> >         at org.junit.Assert.assertEquals(Assert.java:115)
> >         at org.junit.Assert.assertEquals(Assert.java:144)
> >         at
> >
> >
> org.apache.nifi.util.MockFlowFile.assertContentEquals(MockFlowFile.java:232)
> >         at
> >
> >
> org.apache.nifi.util.MockFlowFile.assertContentEquals(MockFlowFile.java:227)
> >         at
> >
> >
> org.apache.nifi.util.MockFlowFile.assertContentEquals(MockFlowFile.java:223)
> >         at
> >
> >
> org.apache.nifi.processors.avro.TestConvertAvroToJSON.testMultipleAvroMessagesContainerNone(TestConvertAvroToJSON.java:127)
> >
> > Running org.apache.nifi.processors.avro.TestExtractAvroMetadata
> > Tests run: 10, Failures: 0, Errors: 0, Skipped: 0, Time elapsed: 0.14
> sec -
> > in org.apache.nifi.processors.avro.TestExtractAvroMetadata
> > Running org.apache.nifi.processors.avro.TestSplitAvro
> > Tests run: 9, Failures: 0, Errors: 0, Skipped: 0, Time elapsed: 0.304
> sec -
> > in org.apache.nifi.processors.avro.TestSplitAvro
> >
> > Results :
> >
> > Failed tests:
> >   TestConvertAvroToJSON.testMultipleAvroMessagesContainerNone:127
> > expected:<...vorite_color": null}[]
> > {"name": "George", ...> but was:<...vorite_color": null}[
> > ]
> > {"name": "George", ...>
> >
> >
> >
> > Tests run: 23, Failures: 1, Errors: 0, Skipped: 0
> >
> >
> >
> >
> > --
> > View this message in context:
> >
> http://apache-nifi-developer-list.39713.n7.nabble.com/Avro-tests-are-broken-on-Windows-tp3538p3544.html
> > Sent from the Apache NiFi Developer List mailing list archive at
> > Nabble.com.
> >
>

Re: Avro tests are broken on Windows?

Posted by Bryan Bende <bb...@gmail.com>.
I don't really have a way of trying this since I don't have a windows
machine, but I noticed that the processor writes a new line like this:

System.lineSeparator().getBytes(StandardCharsets.UTF_8)

but in the test it looks for "}\n{" so maybe if that \n was replaced with
System.lineSeparator() it would work??

On Tue, Nov 3, 2015 at 6:41 AM, Toivo Adams <to...@gmail.com> wrote:

> Same here, win7
>
> -------------------------------------------------------
>  T E S T S
> -------------------------------------------------------
> Running org.apache.nifi.processors.avro.TestConvertAvroToJSON
> Tests run: 4, Failures: 1, Errors: 0, Skipped: 0, Time elapsed: 0.421 sec
> <<< FAILURE! - in org.apache.nifi.processors.avro.TestConvertAvroToJSON
>
> testMultipleAvroMessagesContainerNone(org.apache.nifi.processors.avro.TestConvertAvroToJSON)
> Time elapsed: 0.01 sec  <<< FAILURE!
> org.junit.ComparisonFailure: expected:<...vorite_color": null}[]
> {"name": "George", ...> but was:<...vorite_color": null}[
> ]
> {"name": "George", ...>
>         at org.junit.Assert.assertEquals(Assert.java:115)
>         at org.junit.Assert.assertEquals(Assert.java:144)
>         at
>
> org.apache.nifi.util.MockFlowFile.assertContentEquals(MockFlowFile.java:232)
>         at
>
> org.apache.nifi.util.MockFlowFile.assertContentEquals(MockFlowFile.java:227)
>         at
>
> org.apache.nifi.util.MockFlowFile.assertContentEquals(MockFlowFile.java:223)
>         at
>
> org.apache.nifi.processors.avro.TestConvertAvroToJSON.testMultipleAvroMessagesContainerNone(TestConvertAvroToJSON.java:127)
>
> Running org.apache.nifi.processors.avro.TestExtractAvroMetadata
> Tests run: 10, Failures: 0, Errors: 0, Skipped: 0, Time elapsed: 0.14 sec -
> in org.apache.nifi.processors.avro.TestExtractAvroMetadata
> Running org.apache.nifi.processors.avro.TestSplitAvro
> Tests run: 9, Failures: 0, Errors: 0, Skipped: 0, Time elapsed: 0.304 sec -
> in org.apache.nifi.processors.avro.TestSplitAvro
>
> Results :
>
> Failed tests:
>   TestConvertAvroToJSON.testMultipleAvroMessagesContainerNone:127
> expected:<...vorite_color": null}[]
> {"name": "George", ...> but was:<...vorite_color": null}[
> ]
> {"name": "George", ...>
>
>
>
> Tests run: 23, Failures: 1, Errors: 0, Skipped: 0
>
>
>
>
> --
> View this message in context:
> http://apache-nifi-developer-list.39713.n7.nabble.com/Avro-tests-are-broken-on-Windows-tp3538p3544.html
> Sent from the Apache NiFi Developer List mailing list archive at
> Nabble.com.
>

Re: Avro tests are broken on Windows?

Posted by Toivo Adams <to...@gmail.com>.
Same here, win7

-------------------------------------------------------
 T E S T S
-------------------------------------------------------
Running org.apache.nifi.processors.avro.TestConvertAvroToJSON
Tests run: 4, Failures: 1, Errors: 0, Skipped: 0, Time elapsed: 0.421 sec
<<< FAILURE! - in org.apache.nifi.processors.avro.TestConvertAvroToJSON
testMultipleAvroMessagesContainerNone(org.apache.nifi.processors.avro.TestConvertAvroToJSON) 
Time elapsed: 0.01 sec  <<< FAILURE!
org.junit.ComparisonFailure: expected:<...vorite_color": null}[]
{"name": "George", ...> but was:<...vorite_color": null}[
]
{"name": "George", ...>
	at org.junit.Assert.assertEquals(Assert.java:115)
	at org.junit.Assert.assertEquals(Assert.java:144)
	at
org.apache.nifi.util.MockFlowFile.assertContentEquals(MockFlowFile.java:232)
	at
org.apache.nifi.util.MockFlowFile.assertContentEquals(MockFlowFile.java:227)
	at
org.apache.nifi.util.MockFlowFile.assertContentEquals(MockFlowFile.java:223)
	at
org.apache.nifi.processors.avro.TestConvertAvroToJSON.testMultipleAvroMessagesContainerNone(TestConvertAvroToJSON.java:127)

Running org.apache.nifi.processors.avro.TestExtractAvroMetadata
Tests run: 10, Failures: 0, Errors: 0, Skipped: 0, Time elapsed: 0.14 sec -
in org.apache.nifi.processors.avro.TestExtractAvroMetadata
Running org.apache.nifi.processors.avro.TestSplitAvro
Tests run: 9, Failures: 0, Errors: 0, Skipped: 0, Time elapsed: 0.304 sec -
in org.apache.nifi.processors.avro.TestSplitAvro

Results :

Failed tests: 
  TestConvertAvroToJSON.testMultipleAvroMessagesContainerNone:127
expected:<...vorite_color": null}[]
{"name": "George", ...> but was:<...vorite_color": null}[
]
{"name": "George", ...>



Tests run: 23, Failures: 1, Errors: 0, Skipped: 0




--
View this message in context: http://apache-nifi-developer-list.39713.n7.nabble.com/Avro-tests-are-broken-on-Windows-tp3538p3544.html
Sent from the Apache NiFi Developer List mailing list archive at Nabble.com.