Skip to content
New issue

Have a question about this project? # for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “#”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? # to your account

test fails during mvn install #116

Closed
kminooie opened this issue Dec 17, 2014 · 8 comments
Closed

test fails during mvn install #116

kminooie opened this issue Dec 17, 2014 · 8 comments
Assignees
Labels
Milestone

Comments

@kminooie
Copy link

INFO: [OC#39] Changing GC strategy from: singleparcon to: singleparpar, reason: Emergency parallel sweep requested.
dec 17, 2014 11:45:50 FM com.tagtraum.perf.gcviewer.imp.DataReaderJRockit1_6_0 read
INFO: [OC#40] Changing GC strategy from: singleparpar to: singleparcon, reason: Return to basic strategy.
dec 17, 2014 11:45:50 FM com.tagtraum.perf.gcviewer.imp.DataReaderJRockit1_6_0 read
INFO: [OC#41] Changing GC strategy from: singleparcon to: singleparpar, reason: Emergency parallel sweep requested.
dec 17, 2014 11:45:50 FM com.tagtraum.perf.gcviewer.imp.DataReaderJRockit1_6_0 read
INFO: [OC#42] Changing GC strategy from: singleparpar to: singleparcon, reason: Return to basic strategy.
dec 17, 2014 11:45:50 FM com.tagtraum.perf.gcviewer.imp.DataReaderJRockit1_6_0 read
VARNING: GC log contains OutOfMemory error: Throwing OutOfMemory: allocLargeObjectOrArray: [B, size 118101136
dec 17, 2014 11:45:50 FM com.tagtraum.perf.gcviewer.imp.DataReaderJRockit1_6_0 read
INFO: Reading done.
dec 17, 2014 11:45:50 FM com.tagtraum.perf.gcviewer.util.HttpUrlConnectionHelper openInputStream
INFO: Reading 559 bytes from http://localhost/gclog.txt; contentType = text/plain; contentEncoding = gzip; last modified = Wed Dec 17 11:38:46 PST 2014
dec 17, 2014 11:45:50 FM com.tagtraum.perf.gcviewer.util.HttpUrlConnectionHelper openInputStream
INFO: Reading 0 bytes from http://localhost/gclog.txt; contentType = text/html; charset=UTF-8; contentEncoding = gzip; last modified = -
dec 17, 2014 11:45:50 FM com.tagtraum.perf.gcviewer.util.HttpUrlConnectionHelper openInputStream
INFO: Server sent 404: Not found
dec 17, 2014 11:45:50 FM com.tagtraum.perf.gcviewer.util.HttpUrlConnectionHelper openInputStream
INFO: Reading 2944 bytes from http://localhost/gclog.txt; contentType = text/plain; contentEncoding = null; last modified = Wed Dec 17 11:38:46 PST 2014
dec 17, 2014 11:45:50 FM com.tagtraum.perf.gcviewer.util.HttpUrlConnectionHelper openInputStream
INFO: Reading 0 bytes from http://localhost/gclog.txt; contentType = text/html; charset=UTF-8; contentEncoding = null; last modified = -
dec 17, 2014 11:45:50 FM com.tagtraum.perf.gcviewer.util.HttpUrlConnectionHelper openInputStream
INFO: Server sent 404: Not found
Tests run: 233, Failures: 1, Errors: 0, Skipped: 0, Time elapsed: 9.711 sec <<< FAILURE!
openInputStreamGZipOk(com.tagtraum.perf.gcviewer.util.TestHttpUrlConnectionHelper) Time elapsed: 0.157 sec <<< FAILURE!
java.lang.AssertionError: openInputStream(conn,gzip): # bytes read at position 0 expected:<2944> but was:<2976>
at org.junit.Assert.fail(Assert.java:88)
at org.junit.Assert.failNotEquals(Assert.java:743)
at org.junit.Assert.assertEquals(Assert.java:118)
at org.junit.Assert.assertEquals(Assert.java:555)
at com.tagtraum.perf.gcviewer.util.TestHttpUrlConnectionHelper.verifyInputStreamWithFile(TestHttpUrlConnectionHelper.java:183)
at com.tagtraum.perf.gcviewer.util.TestHttpUrlConnectionHelper.testOpenInputStreamOk(TestHttpUrlConnectionHelper.java:156)
at com.tagtraum.perf.gcviewer.util.TestHttpUrlConnectionHelper.openInputStreamGZipOk(TestHttpUrlConnectionHelper.java:80)

Results :

Failed tests:
TestHttpUrlConnectionHelper.openInputStreamGZipOk:80->testOpenInputStreamOk:156->verifyInputStreamWithFile:183 openInputStream(conn,gzip): # bytes read at position 0 expected:<2944> but was:<2976>

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

[INFO] ------------------------------------------------------------------------
[INFO] BUILD FAILURE
[INFO] ------------------------------------------------------------------------

@chewiebug
Copy link
Owner

I am running the tests quite frequently and haven't encountered this one
yet. What operating system, java version, maven version are you using?

@kminooie
Copy link
Author

[kaveh@km classes]$ mvn -version
Apache Maven 3.2.1 (ea8b2b07643dbb1b84b6d16e1f08391b666bc1e9; 2014-02-14T09:37:52-08:00)
Maven home: /opt/apache-maven-3.2.1
Java version: 1.8.0_25, vendor: Oracle Corporation
Java home: /usr/java/jdk1.8.0_25/jre
Default locale: en_US, platform encoding: UTF-8
OS name: "linux", version: "3.17.6-200.fc20.x86_64", arch: "amd64", family: "unix"
[kaveh@km classes]$ cat /etc/fedora-release
Fedora release 20 (Heisenbug)

@cgrinds
Copy link
Contributor

cgrinds commented Dec 18, 2014

Looks like a line-ending issue.
I'm on OSX, when comparing
src/test/resources/openjdk/SampleSun1_6_0PrintHeapAtGC.txt
and the contents of
src/test/resources/openjdk/SampleSun1_6_0PrintHeapAtGC.txt.gz

the text in the gz has line endings of 0D 0A while SampleSun1_6_0PrintHeapAtGC.txt has just 0A

The size of SampleSun1_6_0PrintHeapAtGC.txt is 2944 bytes, while the size of the same file in the gz is 2976 bytes.

@kminooie
Copy link
Author

Yup, I removed the SampleSun1_6_0PrintHeapAtGC.txt.gz, and gziped the SampleSun1_6_0PrintHeapAtGC.txt and it worked. thanks

@chewiebug chewiebug added the bug label Jan 7, 2015
@chewiebug
Copy link
Owner

Hmm, this seems to be quite tricky. In #120 someone has the same failure on a windows platform. Maybe, I'll have to rewrite this test to make it run on all platforms.

@chewiebug chewiebug reopened this Jan 7, 2015
@chewiebug chewiebug added this to the 1.34.1 milestone Jan 10, 2015
chewiebug added a commit that referenced this issue Jan 11, 2015
@chewiebug chewiebug self-assigned this Jan 11, 2015
@chewiebug
Copy link
Owner

I have pushed a fix to the repository. Does the test failure now dissapear?

@cgrinds
Copy link
Contributor

cgrinds commented Jan 11, 2015

Yes, with your latest fix TestHttpUrlConnectionHelper passes.

@chewiebug
Copy link
Owner

Thanks a lot for checking!

# for free to join this conversation on GitHub. Already have an account? # to comment
Labels
Projects
None yet
Development

No branches or pull requests

3 participants