{"action":"created","issue":{"url":"https://api.github.com/repos/rails/rails/issues/20535","labels_url":"https://api.github.com/repos/rails/rails/issues/20535/labels{/name}","comments_url":"https://api.github.com/repos/rails/rails/issues/20535/comments","events_url":"https://api.github.com/repos/rails/rails/issues/20535/events","html_url":"https://github.com/rails/rails/issues/20535","id":87791477,"number":20535,"title":"Issue running AutomaticCollectionCacheTest tests in a specific order","user":{"login":"repinel","id":1685896,"avatar_url":"https://avatars.githubusercontent.com/u/1685896?v=3","gravatar_id":"","url":"https://api.github.com/users/repinel","html_url":"https://github.com/repinel","followers_url":"https://api.github.com/users/repinel/followers","following_url":"https://api.github.com/users/repinel/following{/other_user}","gists_url":"https://api.github.com/users/repinel/gists{/gist_id}","starred_url":"https://api.github.com/users/repinel/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/repinel/subscriptions","organizations_url":"https://api.github.com/users/repinel/orgs","repos_url":"https://api.github.com/users/repinel/repos","events_url":"https://api.github.com/users/repinel/events{/privacy}","received_events_url":"https://api.github.com/users/repinel/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"milestone":null,"comments":1,"created_at":"2015-06-12T17:10:56Z","updated_at":"2015-06-15T19:46:28Z","closed_at":null,"body":"It appeared in [this build](https://travis-ci.org/rails/rails/jobs/66489622) for the commit 0965be14e22c4d1fd6befda4fd3efb942e0701ca using `--seed 49713`. Even with that seed, it does not always happen.\r\n\r\nSo far, it seems that [AutomaticCollectionCacheTest#test_explicit_render_call_with_options](https://github.com/rails/rails/blob/8beb328befa53d74fe9c7942ddb188563bd4de33/actionpack/test/controller/caching_test.rb#L400) is being called before [AutomaticCollectionCacheTest#test_caching_works_with_beginning_comment](https://github.com/rails/rails/blob/8beb328befa53d74fe9c7942ddb188563bd4de33/actionpack/test/controller/caching_test.rb#L406) and is adding the partial `customers/customer` to the cache. That prevents the action `index_with_comment` to actually render `customers/commented_customer` and provides it the cached output, since both partials do generate the same output and have the same `collection`.\r\n\r\nI thought that ActiveSupport::Cache::MemoryStore was having issues keeping it thread-safe, but I believe is working as designed if you consider that the tests are running from the same process and thread.\r\n\r\n@rafaelfranca any thought on this?\r\n"},"comment":{"url":"https://api.github.com/repos/rails/rails/issues/comments/112185948","html_url":"https://github.com/rails/rails/issues/20535#issuecomment-112185948","issue_url":"https://api.github.com/repos/rails/rails/issues/20535","id":112185948,"user":{"login":"kaspth","id":350807,"avatar_url":"https://avatars.githubusercontent.com/u/350807?v=3","gravatar_id":"","url":"https://api.github.com/users/kaspth","html_url":"https://github.com/kaspth","followers_url":"https://api.github.com/users/kaspth/followers","following_url":"https://api.github.com/users/kaspth/following{/other_user}","gists_url":"https://api.github.com/users/kaspth/gists{/gist_id}","starred_url":"https://api.github.com/users/kaspth/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/kaspth/subscriptions","organizations_url":"https://api.github.com/users/kaspth/orgs","repos_url":"https://api.github.com/users/kaspth/repos","events_url":"https://api.github.com/users/kaspth/events{/privacy}","received_events_url":"https://api.github.com/users/kaspth/received_events","type":"User","site_admin":false},"created_at":"2015-06-15T19:46:28Z","updated_at":"2015-06-15T19:46:28Z","body":"Hey, thanks for looking into this :smile:\r\n\r\nI could see your argument if the problem happened every time, but not when the test fails some of the time. Besides the cache keys will have a digest at the end of the templates contents. Since the `customer` and `commented_customer` won't generate the same digest, the keys won't clash.\r\n\r\nThought you're right, we need some second eyes on this. @rafaelfranca @matthewd, do you have any suggestions?"}}