Discussion:
build failes for commons-io
Aleksander Ściborek
2018-10-15 20:11:37 UTC
Permalink
Hi,
I had forked commons-io and pulled it from github and later on I run mvn
clean package. I've got 9 failures - One from FileUtilsTestCase and more
from IOUtilsTestCase.
Aleksander
sebb
2018-10-15 20:50:51 UTC
Permalink
On Mon, 15 Oct 2018 at 21:11, Aleksander Ściborek
Post by Aleksander Ściborek
Hi,
I had forked commons-io and pulled it from github and later on I run mvn
clean package. I've got 9 failures - One from FileUtilsTestCase and more
from IOUtilsTestCase.
It works for me using the following software.

Apache Maven 3.5.4 (1edded0938998edf8bf061f1ceb3cfdeccf443fe;
2018-06-17T19:33:14+01:00)
Maven home: /opt/apache-maven-3.5.4
Java version: 1.8.0_151, vendor: Oracle Corporation, runtime:
/Library/Java/JavaVirtualMachines/jdk1.8.0_151.jdk/Contents/Home/jre
Default locale: en_GB, platform encoding: UTF-8
OS name: "mac os x", version: "10.13.6", arch: "x86_64", family: "mac"

You'll have to provide more information.
- the actual errors
- Maven version
- Java provider and version
- OS and version
Post by Aleksander Ściborek
Aleksander
---------------------------------------------------------------------
To unsubscribe, e-mail: dev-***@commons.apache.org
For additional commands, e-mail: dev-***@commons.apache.org
Aleksander Ściborek
2018-10-15 20:55:48 UTC
Permalink
Ok. soon I will add more information, but actually you can see that it
fails on github: https://travis-ci.org/apache/commons-io
On Mon, 15 Oct 2018 at 21:11, Aleksander Ściborek
Post by Aleksander Ściborek
Hi,
I had forked commons-io and pulled it from github and later on I run mvn
clean package. I've got 9 failures - One from FileUtilsTestCase and more
from IOUtilsTestCase.
It works for me using the following software.
Apache Maven 3.5.4 (1edded0938998edf8bf061f1ceb3cfdeccf443fe;
2018-06-17T19:33:14+01:00)
Maven home: /opt/apache-maven-3.5.4
/Library/Java/JavaVirtualMachines/jdk1.8.0_151.jdk/Contents/Home/jre
Default locale: en_GB, platform encoding: UTF-8
OS name: "mac os x", version: "10.13.6", arch: "x86_64", family: "mac"
You'll have to provide more information.
- the actual errors
- Maven version
- Java provider and version
- OS and version
Post by Aleksander Ściborek
Aleksander
---------------------------------------------------------------------
sebb
2018-10-15 21:40:52 UTC
Permalink
On Mon, 15 Oct 2018 at 21:56, Aleksander Ściborek
Post by Aleksander Ściborek
Ok. soon I will add more information, but actually you can see that it
fails on github: https://travis-ci.org/apache/commons-io
Those appear to be Checkstyle errors, not test errors.
Post by Aleksander Ściborek
Post by sebb
On Mon, 15 Oct 2018 at 21:11, Aleksander Ściborek
Post by Aleksander Ściborek
Hi,
I had forked commons-io and pulled it from github and later on I run mvn
clean package. I've got 9 failures - One from FileUtilsTestCase and more
from IOUtilsTestCase.
It works for me using the following software.
Apache Maven 3.5.4 (1edded0938998edf8bf061f1ceb3cfdeccf443fe;
2018-06-17T19:33:14+01:00)
Maven home: /opt/apache-maven-3.5.4
/Library/Java/JavaVirtualMachines/jdk1.8.0_151.jdk/Contents/Home/jre
Default locale: en_GB, platform encoding: UTF-8
OS name: "mac os x", version: "10.13.6", arch: "x86_64", family: "mac"
You'll have to provide more information.
- the actual errors
- Maven version
- Java provider and version
- OS and version
Post by Aleksander Ściborek
Aleksander
---------------------------------------------------------------------
---------------------------------------------------------------------
To unsubscribe, e-mail: dev-***@commons.apache.org
For additional commands, e-mail: dev-***@commons.apache.org
Aleksander Ściborek
2018-10-15 21:44:25 UTC
Permalink
Ok, so this is list of errors:
FileUtilsTestCase.testContentEqualsIgnoreEOL:672
IOUtilsTestCase.testResourceToByteArray_ExistingResourceAtRootPackage:1251
expected:<0> but was:<1705>
IOUtilsTestCase.testResourceToByteArray_ExistingResourceAtRootPackage_WithClassLoader:1258
expected:<0> but was:<1705>
IOUtilsTestCase.testResourceToByteArray_ExistingResourceAtSubPackage:1265
expected:<0> but was:<6>
IOUtilsTestCase.testResourceToByteArray_ExistingResourceAtSubPackage_WithClassLoader:1272
expected:<0> but was:<6>
IOUtilsTestCase.testResourceToString_ExistingResourceAtRootPackage:1168
expected:<0> but was:<5>
IOUtilsTestCase.testResourceToString_ExistingResourceAtRootPackage_WithClassLoader:1180
expected:<0> but was:<5>
IOUtilsTestCase.testResourceToString_ExistingResourceAtSubPackage:1188
expected:<0> but was:<6>
IOUtilsTestCase.testResourceToString_ExistingResourceAtSubPackage_WithClassLoader:1200
expected:<0> but was:<6>

Details of maven java etc:

Apache Maven 3.5.2
Maven home: /usr/share/maven
Java version: 1.8.0_181, vendor: Oracle Corporation
Java home: /usr/lib/jvm/java-8-openjdk-amd64/jre
Default locale: en_US, platform encoding: UTF-8
OS name: "linux", version: "4.15.0-36-generic", arch: "amd64", family:
"unix"


On Mon, 15 Oct 2018 at 22:55, Aleksander Ściborek <
Post by Aleksander Ściborek
Ok. soon I will add more information, but actually you can see that it
fails on github: https://travis-ci.org/apache/commons-io
On Mon, 15 Oct 2018 at 21:11, Aleksander Ściborek
Post by Aleksander Ściborek
Hi,
I had forked commons-io and pulled it from github and later on I run mvn
clean package. I've got 9 failures - One from FileUtilsTestCase and more
from IOUtilsTestCase.
It works for me using the following software.
Apache Maven 3.5.4 (1edded0938998edf8bf061f1ceb3cfdeccf443fe;
2018-06-17T19:33:14+01:00)
Maven home: /opt/apache-maven-3.5.4
/Library/Java/JavaVirtualMachines/jdk1.8.0_151.jdk/Contents/Home/jre
Default locale: en_GB, platform encoding: UTF-8
OS name: "mac os x", version: "10.13.6", arch: "x86_64", family: "mac"
You'll have to provide more information.
- the actual errors
- Maven version
- Java provider and version
- OS and version
Post by Aleksander Ściborek
Aleksander
---------------------------------------------------------------------
sebb
2018-10-15 21:54:00 UTC
Permalink
On Mon, 15 Oct 2018 at 22:44, Aleksander Ściborek
Post by Aleksander Ściborek
FileUtilsTestCase.testContentEqualsIgnoreEOL:672
IOUtilsTestCase.testResourceToByteArray_ExistingResourceAtRootPackage:1251
expected:<0> but was:<1705>
What is the size of the following file:

src/test/resources/test-file-utf8.bin
Post by Aleksander Ściborek
IOUtilsTestCase.testResourceToByteArray_ExistingResourceAtRootPackage_WithClassLoader:1258
expected:<0> but was:<1705>
IOUtilsTestCase.testResourceToByteArray_ExistingResourceAtSubPackage:1265
expected:<0> but was:<6>
IOUtilsTestCase.testResourceToByteArray_ExistingResourceAtSubPackage_WithClassLoader:1272
expected:<0> but was:<6>
IOUtilsTestCase.testResourceToString_ExistingResourceAtRootPackage:1168
expected:<0> but was:<5>
IOUtilsTestCase.testResourceToString_ExistingResourceAtRootPackage_WithClassLoader:1180
expected:<0> but was:<5>
IOUtilsTestCase.testResourceToString_ExistingResourceAtSubPackage:1188
expected:<0> but was:<6>
IOUtilsTestCase.testResourceToString_ExistingResourceAtSubPackage_WithClassLoader:1200
expected:<0> but was:<6>
Apache Maven 3.5.2
Maven home: /usr/share/maven
Java version: 1.8.0_181, vendor: Oracle Corporation
Java home: /usr/lib/jvm/java-8-openjdk-amd64/jre
Default locale: en_US, platform encoding: UTF-8
"unix"
On Mon, 15 Oct 2018 at 22:55, Aleksander Ściborek <
Post by Aleksander Ściborek
Ok. soon I will add more information, but actually you can see that it
fails on github: https://travis-ci.org/apache/commons-io
Post by sebb
On Mon, 15 Oct 2018 at 21:11, Aleksander Ściborek
Post by Aleksander Ściborek
Hi,
I had forked commons-io and pulled it from github and later on I run mvn
clean package. I've got 9 failures - One from FileUtilsTestCase and more
from IOUtilsTestCase.
It works for me using the following software.
Apache Maven 3.5.4 (1edded0938998edf8bf061f1ceb3cfdeccf443fe;
2018-06-17T19:33:14+01:00)
Maven home: /opt/apache-maven-3.5.4
/Library/Java/JavaVirtualMachines/jdk1.8.0_151.jdk/Contents/Home/jre
Default locale: en_GB, platform encoding: UTF-8
OS name: "mac os x", version: "10.13.6", arch: "x86_64", family: "mac"
You'll have to provide more information.
- the actual errors
- Maven version
- Java provider and version
- OS and version
Post by Aleksander Ściborek
Aleksander
---------------------------------------------------------------------
---------------------------------------------------------------------
To unsubscribe, e-mail: dev-***@commons.apache.org
For additional commands, e-mail: dev-***@commons.apache.org
Aleksander Ściborek
2018-10-15 22:04:16 UTC
Permalink
Github indicates 1.67 KB, on my computer it shows 1,7 KB but this is
probably just rounded value
On Mon, 15 Oct 2018 at 22:44, Aleksander Ściborek
Post by Aleksander Ściborek
FileUtilsTestCase.testContentEqualsIgnoreEOL:672
IOUtilsTestCase.testResourceToByteArray_ExistingResourceAtRootPackage:1251
Post by Aleksander Ściborek
expected:<0> but was:<1705>
src/test/resources/test-file-utf8.bin
IOUtilsTestCase.testResourceToByteArray_ExistingResourceAtRootPackage_WithClassLoader:1258
Post by Aleksander Ściborek
expected:<0> but was:<1705>
IOUtilsTestCase.testResourceToByteArray_ExistingResourceAtSubPackage:1265
Post by Aleksander Ściborek
expected:<0> but was:<6>
IOUtilsTestCase.testResourceToByteArray_ExistingResourceAtSubPackage_WithClassLoader:1272
Post by Aleksander Ściborek
expected:<0> but was:<6>
IOUtilsTestCase.testResourceToString_ExistingResourceAtRootPackage:1168
expected:<0> but was:<5>
IOUtilsTestCase.testResourceToString_ExistingResourceAtRootPackage_WithClassLoader:1180
Post by Aleksander Ściborek
expected:<0> but was:<5>
IOUtilsTestCase.testResourceToString_ExistingResourceAtSubPackage:1188
expected:<0> but was:<6>
IOUtilsTestCase.testResourceToString_ExistingResourceAtSubPackage_WithClassLoader:1200
Post by Aleksander Ściborek
expected:<0> but was:<6>
Apache Maven 3.5.2
Maven home: /usr/share/maven
Java version: 1.8.0_181, vendor: Oracle Corporation
Java home: /usr/lib/jvm/java-8-openjdk-amd64/jre
Default locale: en_US, platform encoding: UTF-8
"unix"
On Mon, 15 Oct 2018 at 22:55, Aleksander Ściborek <
Post by Aleksander Ściborek
Ok. soon I will add more information, but actually you can see that it
fails on github: https://travis-ci.org/apache/commons-io
On Mon, 15 Oct 2018 at 21:11, Aleksander Ściborek
Post by Aleksander Ściborek
Hi,
I had forked commons-io and pulled it from github and later on I
run mvn
Post by Aleksander Ściborek
Post by Aleksander Ściborek
Post by Aleksander Ściborek
clean package. I've got 9 failures - One from FileUtilsTestCase and
more
Post by Aleksander Ściborek
Post by Aleksander Ściborek
Post by Aleksander Ściborek
from IOUtilsTestCase.
It works for me using the following software.
Apache Maven 3.5.4 (1edded0938998edf8bf061f1ceb3cfdeccf443fe;
2018-06-17T19:33:14+01:00)
Maven home: /opt/apache-maven-3.5.4
/Library/Java/JavaVirtualMachines/jdk1.8.0_151.jdk/Contents/Home/jre
Default locale: en_GB, platform encoding: UTF-8
OS name: "mac os x", version: "10.13.6", arch: "x86_64", family: "mac"
You'll have to provide more information.
- the actual errors
- Maven version
- Java provider and version
- OS and version
Post by Aleksander Ściborek
Aleksander
---------------------------------------------------------------------
---------------------------------------------------------------------
sebb
2018-10-15 22:29:28 UTC
Permalink
On Mon, 15 Oct 2018 at 23:04, Aleksander Ściborek
Post by Aleksander Ściborek
Github indicates 1.67 KB, on my computer it shows 1,7 KB but this is
probably just rounded value
That looks OK.

However, the assertion message means that the code detected a size of 0.

No idea why that should be.
I think you will have to amend the test case to show extra info, e.g.
the value of

getClass().getResource("/test-file-simple-utf8.bin").getFile()

and then check the size of that file.
Post by Aleksander Ściborek
Post by sebb
On Mon, 15 Oct 2018 at 22:44, Aleksander Ściborek
Post by Aleksander Ściborek
FileUtilsTestCase.testContentEqualsIgnoreEOL:672
IOUtilsTestCase.testResourceToByteArray_ExistingResourceAtRootPackage:1251
Post by Aleksander Ściborek
expected:<0> but was:<1705>
src/test/resources/test-file-utf8.bin
IOUtilsTestCase.testResourceToByteArray_ExistingResourceAtRootPackage_WithClassLoader:1258
Post by Aleksander Ściborek
expected:<0> but was:<1705>
IOUtilsTestCase.testResourceToByteArray_ExistingResourceAtSubPackage:1265
Post by Aleksander Ściborek
expected:<0> but was:<6>
IOUtilsTestCase.testResourceToByteArray_ExistingResourceAtSubPackage_WithClassLoader:1272
Post by Aleksander Ściborek
expected:<0> but was:<6>
IOUtilsTestCase.testResourceToString_ExistingResourceAtRootPackage:1168
expected:<0> but was:<5>
IOUtilsTestCase.testResourceToString_ExistingResourceAtRootPackage_WithClassLoader:1180
Post by Aleksander Ściborek
expected:<0> but was:<5>
IOUtilsTestCase.testResourceToString_ExistingResourceAtSubPackage:1188
expected:<0> but was:<6>
IOUtilsTestCase.testResourceToString_ExistingResourceAtSubPackage_WithClassLoader:1200
Post by Aleksander Ściborek
expected:<0> but was:<6>
Apache Maven 3.5.2
Maven home: /usr/share/maven
Java version: 1.8.0_181, vendor: Oracle Corporation
Java home: /usr/lib/jvm/java-8-openjdk-amd64/jre
Default locale: en_US, platform encoding: UTF-8
"unix"
On Mon, 15 Oct 2018 at 22:55, Aleksander Ściborek <
Post by Aleksander Ściborek
Ok. soon I will add more information, but actually you can see that it
fails on github: https://travis-ci.org/apache/commons-io
Post by sebb
On Mon, 15 Oct 2018 at 21:11, Aleksander Ściborek
Post by Aleksander Ściborek
Hi,
I had forked commons-io and pulled it from github and later on I
run mvn
Post by Aleksander Ściborek
Post by Aleksander Ściborek
Post by sebb
Post by Aleksander Ściborek
clean package. I've got 9 failures - One from FileUtilsTestCase and
more
Post by Aleksander Ściborek
Post by Aleksander Ściborek
Post by sebb
Post by Aleksander Ściborek
from IOUtilsTestCase.
It works for me using the following software.
Apache Maven 3.5.4 (1edded0938998edf8bf061f1ceb3cfdeccf443fe;
2018-06-17T19:33:14+01:00)
Maven home: /opt/apache-maven-3.5.4
/Library/Java/JavaVirtualMachines/jdk1.8.0_151.jdk/Contents/Home/jre
Default locale: en_GB, platform encoding: UTF-8
OS name: "mac os x", version: "10.13.6", arch: "x86_64", family: "mac"
You'll have to provide more information.
- the actual errors
- Maven version
- Java provider and version
- OS and version
Post by Aleksander Ściborek
Aleksander
---------------------------------------------------------------------
---------------------------------------------------------------------
---------------------------------------------------------------------
To unsubscribe, e-mail: dev-***@commons.apache.org
For additional commands, e-mail: dev-***@commons.apache.org
Aleksander Ściborek
2018-10-15 23:43:04 UTC
Permalink
I think I've found actually reasos for my problems, it's seems it was
caused by long path and spaces in directories names - I run mvn clean
package in tmp folder and everything has passed
On Mon, 15 Oct 2018 at 23:04, Aleksander Ściborek
Post by Aleksander Ściborek
Github indicates 1.67 KB, on my computer it shows 1,7 KB but this is
probably just rounded value
That looks OK.
sebb
2018-10-16 14:36:06 UTC
Permalink
On Tue, 16 Oct 2018 at 00:43, Aleksander Ściborek
Post by Aleksander Ściborek
I think I've found actually reasos for my problems, it's seems it was
caused by long path and spaces in directories names - I run mvn clean
package in tmp folder and everything has passed
Ah, thanks for letting us know.

However, the test should still work if there are spaces in the path
name, so I think there is a code or test code bug.

If the path is too long I'm not sure there's much can be done except
to report an error.
Post by Aleksander Ściborek
Post by sebb
On Mon, 15 Oct 2018 at 23:04, Aleksander Ściborek
Post by Aleksander Ściborek
Github indicates 1.67 KB, on my computer it shows 1,7 KB but this is
probably just rounded value
That looks OK.
---------------------------------------------------------------------
To unsubscribe, e-mail: dev-***@commons.apache.org
For additional commands, e-mail: dev-***@commons.apache.org
sebb
2018-10-16 23:10:41 UTC
Permalink
I've raised a bug (IO-589) and fixed it, so thanks again for finding the error.
It was a bug in the test code.
Post by sebb
On Tue, 16 Oct 2018 at 00:43, Aleksander Ściborek
Post by Aleksander Ściborek
I think I've found actually reasos for my problems, it's seems it was
caused by long path and spaces in directories names - I run mvn clean
package in tmp folder and everything has passed
Ah, thanks for letting us know.
However, the test should still work if there are spaces in the path
name, so I think there is a code or test code bug.
If the path is too long I'm not sure there's much can be done except
to report an error.
Post by Aleksander Ściborek
Post by sebb
On Mon, 15 Oct 2018 at 23:04, Aleksander Ściborek
Post by Aleksander Ściborek
Github indicates 1.67 KB, on my computer it shows 1,7 KB but this is
probably just rounded value
That looks OK.
---------------------------------------------------------------------
To unsubscribe, e-mail: dev-***@commons.apache.org
For additional commands, e-mail: dev-***@commons.apache.org
Aleksander Ściborek
2018-10-16 23:27:17 UTC
Permalink
I've just updated my fork and everything is ok.
Thank you very much :)
Post by sebb
I've raised a bug (IO-589) and fixed it, so thanks again for finding the error.
It was a bug in the test code.
---------------------------------------------------------------------
Loading...