{"action":"created","issue":{"url":"https://api.github.com/repos/google/guava/issues/1568","labels_url":"https://api.github.com/repos/google/guava/issues/1568/labels{/name}","comments_url":"https://api.github.com/repos/google/guava/issues/1568/comments","events_url":"https://api.github.com/repos/google/guava/issues/1568/events","html_url":"https://github.com/google/guava/issues/1568","id":47424977,"number":1568,"title":"CacheReferencesTest fails on Mac with JDK 1.7/1.8","user":{"login":"gissuebot","id":8091570,"avatar_url":"https://avatars.githubusercontent.com/u/8091570?v=3","gravatar_id":"","url":"https://api.github.com/users/gissuebot","html_url":"https://github.com/gissuebot","followers_url":"https://api.github.com/users/gissuebot/followers","following_url":"https://api.github.com/users/gissuebot/following{/other_user}","gists_url":"https://api.github.com/users/gissuebot/gists{/gist_id}","starred_url":"https://api.github.com/users/gissuebot/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/gissuebot/subscriptions","organizations_url":"https://api.github.com/users/gissuebot/orgs","repos_url":"https://api.github.com/users/gissuebot/repos","events_url":"https://api.github.com/users/gissuebot/events{/privacy}","received_events_url":"https://api.github.com/users/gissuebot/received_events","type":"User","site_admin":false},"labels":[{"url":"https://api.github.com/repos/google/guava/labels/package:%20cache","name":"package: cache","color":"207de5"},{"url":"https://api.github.com/repos/google/guava/labels/status:%20research","name":"status: research","color":"bfe5bf"},{"url":"https://api.github.com/repos/google/guava/labels/type:%20dev","name":"type: dev","color":"fbca04"}],"state":"open","locked":false,"assignee":null,"milestone":null,"comments":9,"created_at":"2014-10-31T17:51:25Z","updated_at":"2015-07-15T06:42:05Z","closed_at":null,"body":"_[Original issue](https://code.google.com/p/guava-libraries/issues/detail?id=1568) created by **sebastian.davids** on 2013-11-04 at 07:40 AM_\n\n---\n\n-------------------------------------------------------\n&nbsp;T E S T S\n-------------------------------------------------------\nRunning com.google.common.cache.CacheReferencesTest\nTests run: 5, Failures: 1, Errors: 0, Skipped: 0, Time elapsed: 155.376 sec <<< FAILURE!\n\nResults :\n\nFailed tests: \n&nbsp;&nbsp;testCleanupOnReferenceCollection(com.google.common.cache.CacheReferencesTest): expected:&lt;1> but was:&lt;2>\n\n@@@@\n\n$ git rev-parse HEAD\ncff5df6b48b892574975dc045f6ed3552d4b3d1d\n\n\nIt fails with:\n\nApache Maven 3.0.5 (r01de14724cdef164cd33c7c8c2fe155faf9602da; 2013-02-19 14:51:28+0100)\nMaven home: /opt/local/share/java/maven3\nJava version: 1.7.0_40, vendor: Oracle Corporation\nJava home: /Library/Java/JavaVirtualMachines/jdk1.7.0_40.jdk/Contents/Home/jre\nDefault locale: en_US, platform encoding: UTF-8\nOS name: \"mac os x\", version: \"10.8.5\", arch: \"x86_64\", family: \"mac\"\n\nand\n\nApache Maven 3.0.5 (r01de14724cdef164cd33c7c8c2fe155faf9602da; 2013-02-19 14:51:28+0100)\nMaven home: /opt/local/share/java/maven3\nJava version: 1.7.0_45, vendor: Oracle Corporation\nJava home: /Library/Java/JavaVirtualMachines/jdk1.7.0_40.jdk/Contents/Home/jre\nDefault locale: en_US, platform encoding: UTF-8\nOS name: \"mac os x\", version: \"10.8.5\", arch: \"x86_64\", family: \"mac\"\n\nand\n\nApache Maven 3.0.5 (r01de14724cdef164cd33c7c8c2fe155faf9602da; 2013-02-19 14:51:28+0100)\nMaven home: /opt/local/share/java/maven3\nJava version: 1.8.0-ea, vendor: Oracle Corporation\nJava home: /Library/Java/JavaVirtualMachines/jdk1.8.0.jdk/Contents/Home/jre\nDefault locale: en_US, platform encoding: UTF-8\nOS name: \"mac os x\", version: \"10.8.5\", arch: \"x86_64\", family: \"mac\"\n\nBut works with:\n\nApache Maven 3.0.5 (r01de14724cdef164cd33c7c8c2fe155faf9602da; 2013-02-19 14:51:28+0100)\nMaven home: /opt/local/share/java/maven3\nJava version: 1.6.0_65, vendor: Apple Inc.\nJava home: /System/Library/Java/JavaVirtualMachines/1.6.0.jdk/Contents/Home\nDefault locale: en_US, platform encoding: MacRoman\nOS name: \"mac os x\", version: \"10.8.5\", arch: \"x86_64\", family: \"mac\"\n\nRunning the tests on JDK 1.7/1.8 takes very long compared to running them with JDK 1.6.\n"},"comment":{"url":"https://api.github.com/repos/google/guava/issues/comments/121508417","html_url":"https://github.com/google/guava/issues/1568#issuecomment-121508417","issue_url":"https://api.github.com/repos/google/guava/issues/1568","id":121508417,"user":{"login":"ben-manes","id":378614,"avatar_url":"https://avatars.githubusercontent.com/u/378614?v=3","gravatar_id":"","url":"https://api.github.com/users/ben-manes","html_url":"https://github.com/ben-manes","followers_url":"https://api.github.com/users/ben-manes/followers","following_url":"https://api.github.com/users/ben-manes/following{/other_user}","gists_url":"https://api.github.com/users/ben-manes/gists{/gist_id}","starred_url":"https://api.github.com/users/ben-manes/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/ben-manes/subscriptions","organizations_url":"https://api.github.com/users/ben-manes/orgs","repos_url":"https://api.github.com/users/ben-manes/repos","events_url":"https://api.github.com/users/ben-manes/events{/privacy}","received_events_url":"https://api.github.com/users/ben-manes/received_events","type":"User","site_admin":false},"created_at":"2015-07-15T06:42:05Z","updated_at":"2015-07-15T06:42:05Z","body":"The best way to do this is to use `-XX:SoftRefLRUPolicyMSPerMB=0` to force soft references to behave as weak references, thereby allowing the test to safely assume a GC will clear the reference. This means running the test through the build can be reliable, but a note on the unit test has to be added for anyone running the test through their IDE."}}