Closed GoogleCodeExporter closed 9 years ago
Original comment by kevinb@google.com
on 20 Nov 2013 at 8:13
This might be a 64-bit thing, whether a bug in the test or a 64-bit-specific
JIT (or something) problem. I say that because I'm seeing failures and
mysterious early terminations when running the test with a 64-bit Linux JDK7.
(The mysterious early terminations might conceivably be caused by our internal
build system, though I should note that the build system is reporting FAILED
and not TIMEOUT.)
...
Running com.google.common.cache.CacheReferencesTest
Tests run: 5, Failures: 1, Errors: 0, Skipped: 0, Time elapsed: 1,535.714 sec
<<< FAILURE!
Running com.google.common.cache.EmptyCachesTest
<end of log>
...
Running com.google.common.cache.CacheReferencesTest
<end of log>
Original comment by cpov...@google.com
on 9 Dec 2013 at 9:24
Here's the failure that I'm getting when I run with a couple flags
(-Dtest.include="**/CacheReferencesTest.java" -Dsurefire.useFile=false):
Running com.google.common.cache.CacheReferencesTest
Tests run: 5, Failures: 1, Errors: 0, Skipped: 0, Time elapsed: 279.781 sec <<<
FAILURE!
testCleanupOnReferenceCollection(com.google.common.cache.CacheReferencesTest)
Time elapsed: 279.67 sec <<< FAILURE!
junit.framework.AssertionFailedError: expected:<1> but was:<2>
at junit.framework.Assert.fail(Assert.java:47)
at junit.framework.Assert.failNotEquals(Assert.java:283)
at junit.framework.Assert.assertEquals(Assert.java:64)
at junit.framework.Assert.assertEquals(Assert.java:130)
at junit.framework.Assert.assertEquals(Assert.java:136)
at com.google.common.cache.CacheReferencesTest.assertCleanup(CacheReferencesTest.java:179)
at com.google.common.cache.CacheReferencesTest.testCleanupOnReferenceCollection(CacheReferencesTest.java:146)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:57)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
at java.lang.reflect.Method.invoke(Method.java:606)
at junit.framework.TestCase.runTest(TestCase.java:168)
at junit.framework.TestCase.runBare(TestCase.java:134)
at junit.framework.TestResult$1.protect(TestResult.java:110)
at junit.framework.TestResult.runProtected(TestResult.java:128)
at junit.framework.TestResult.run(TestResult.java:113)
at junit.framework.TestCase.run(TestCase.java:124)
at junit.framework.TestSuite.runTest(TestSuite.java:243)
at junit.framework.TestSuite.run(TestSuite.java:238)
at org.junit.internal.runners.JUnit38ClassRunner.run(JUnit38ClassRunner.java:83)
at org.apache.maven.surefire.junit4.JUnit4TestSet.execute(JUnit4TestSet.java:35)
at org.apache.maven.surefire.junit4.JUnit4Provider.executeTestSet(JUnit4Provider.java:115)
at org.apache.maven.surefire.junit4.JUnit4Provider.invoke(JUnit4Provider.java:97)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:57)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
at java.lang.reflect.Method.invoke(Method.java:606)
at org.apache.maven.surefire.booter.ProviderFactory$ClassLoaderProxy.invoke(ProviderFactory.java:103)
at com.sun.proxy.$Proxy0.invoke(Unknown Source)
at org.apache.maven.surefire.booter.SurefireStarter.invokeProvider(SurefireStarter.java:150)
at org.apache.maven.surefire.booter.SurefireStarter.runSuitesInProcess(SurefireStarter.java:91)
at org.apache.maven.surefire.booter.ForkedBooter.main(ForkedBooter.java:69)
Here's the failing assertion:
http://code.google.com/p/guava-libraries/source/browse/guava-tests/test/com/goog
le/common/cache/CacheReferencesTest.java?name=release15#179
Original comment by cpov...@google.com
on 9 Dec 2013 at 9:54
Hmm, if the problem is the use of 64-bit JVMs, I have a theory:
testCleanupOnReferenceCollection attempts to "fill up heap so soft references
get cleared." If the 64-bit JVMs have a bigger heap, this would naturally take
much longer, if it happens at all.
Original comment by cpov...@google.com
on 9 Dec 2013 at 10:23
And it looks like by "fill up heap" it means "create bigger and bigger byte
arrays until the array is 1 GB and then just keep creating 1 GB arrays and
garbage collecting them".
Original comment by cgdecker@google.com
on 9 Dec 2013 at 10:36
If that's the problem, then a possible solution is to limit the memory
available to Maven's test runner. For now, though, I'm going to suppress the
test.
Original comment by cpov...@google.com
on 10 Dec 2013 at 12:23
This issue has been migrated to GitHub.
It can be found at https://github.com/google/guava/issues/<issue id>
Original comment by cgdecker@google.com
on 1 Nov 2014 at 4:12
Original comment by cgdecker@google.com
on 1 Nov 2014 at 4:17
Original comment by cgdecker@google.com
on 3 Nov 2014 at 9:08
Original issue reported on code.google.com by
sebastia...@gmail.com
on 4 Nov 2013 at 7:40