Skip to content

Comments

NIFI-1651 unit tests work on windows. removed contributor name/package from data and schema#291

Closed
trkurc wants to merge 1 commit intoapache:masterfrom
trkurc:NIFI-1651
Closed

NIFI-1651 unit tests work on windows. removed contributor name/package from data and schema#291
trkurc wants to merge 1 commit intoapache:masterfrom
trkurc:NIFI-1651

Conversation

@trkurc
Copy link
Contributor

@trkurc trkurc commented Mar 19, 2016

No description provided.

@apiri
Copy link
Member

apiri commented Mar 20, 2016

reviewing

@pvillard31
Copy link
Contributor

Tried a mvn clean install without success on my side (I missed something?):
mvn_output.txt

@trkurc
Copy link
Contributor Author

trkurc commented Mar 20, 2016

Pierre, what environment are you running on?

@pvillard31
Copy link
Contributor

Windows 7 Pro / Maven 3.3.9 / Java 1.8.0_74

@trkurc
Copy link
Contributor Author

trkurc commented Mar 20, 2016

Did you clone the code with autocrlf? Does the schema in src/test/resources have line endings?

@mosermw
Copy link
Member

mosermw commented Mar 20, 2016

Using Windows 10, maven 3.3.9, java 1.7.0_79 the nifi-kite-bundle fails on this unit test before this patch. nifi-kite-bundle unit tests work fine after this patch. +1 from me.

@apiri
Copy link
Member

apiri commented Mar 20, 2016

Windows 7, Maven 3.3.3, and JDK 8u71 looks good here.

Will look for updates from @pvillard31

@pvillard31
Copy link
Contributor

Sorry for the delay... I am on a different computer than usual and forgot to check the git property. Did a full clone again (so slow with airport wifi...) and checked the schema (looks OK to me). The git property solved most of the issues, but some are remaining:

Running org.apache.nifi.processors.kite.TestAvroRecordConverter
Tests run: 4, Failures: 0, Errors: 1, Skipped: 0, Time elapsed: 0.377 sec <<< FAILURE! - in org.apache.nifi.processors.kite.TestAvroRecordConverter
testDefaultConversion(org.apache.nifi.processors.kite.TestAvroRecordConverter)  Time elapsed: 0.011 sec  <<< ERROR!
org.apache.nifi.processors.kite.AvroRecordConverter$AvroConversionException: Cannot convert 5.5 to double
        at org.apache.nifi.processors.kite.AvroRecordConverter.convertData(AvroRecordConverter.java:246)
        at org.apache.nifi.processors.kite.AvroRecordConverter.convert(AvroRecordConverter.java:170)
        at org.apache.nifi.processors.kite.TestAvroRecordConverter.testDefaultConversion(TestAvroRecordConverter.java:98)

Running org.apache.nifi.processors.kite.TestConfigurationProperty
Tests run: 2, Failures: 0, Errors: 0, Skipped: 0, Time elapsed: 0.849 sec - in org.apache.nifi.processors.kite.TestConfigurationProperty
Running org.apache.nifi.processors.kite.TestConvertAvroSchema
Tests run: 2, Failures: 1, Errors: 0, Skipped: 0, Time elapsed: 0.22 sec <<< FAILURE! - in org.apache.nifi.processors.kite.TestConvertAvroSchema
testBasicConversion(org.apache.nifi.processors.kite.TestConvertAvroSchema)  Time elapsed: 0.21 sec  <<< FAILURE!
java.lang.AssertionError: Should convert 2 rows expected:<2> but was:<1>
        at org.junit.Assert.fail(Assert.java:88)
        at org.junit.Assert.failNotEquals(Assert.java:834)
        at org.junit.Assert.assertEquals(Assert.java:645)
        at org.apache.nifi.processors.kite.TestConvertAvroSchema.testBasicConversion(TestConvertAvroSchema.java:78)

@trkurc
Copy link
Contributor Author

trkurc commented Mar 20, 2016

@pvillard31 - I was able to replicate the errors in the txt file you included by adding \r's to the file (windows line endings). The other errors are on tests that haven't changed in this PR, but I can dig in.

@pvillard31
Copy link
Contributor

@trkurc I am currently checking on my side why the other unit tests are in failure. But as you said, this is not related to this PR, so it is OK for me.

@asfgit asfgit closed this in 3921ab8 Mar 20, 2016
@pvillard31
Copy link
Contributor

Just for the record, the error is because of my local env. This is fixed by setting the locale to US on the scanner:

scanner.useLocale(java.util.Locale.US);

I don't know if there is a way to set this at a global scale.

@joewitt
Copy link
Contributor

joewitt commented Mar 20, 2016

hmm good find @pvillard31 We need to make the code more locale tolerant apparently. Will create a JIRA for that.

@trkurc
Copy link
Contributor Author

trkurc commented Mar 20, 2016

So, likely needs a processor change to add a default locale and some ability to override it

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

5 participants