{"action":"created","issue":{"url":"https://api.github.com/repos/substack/tape/issues/207","labels_url":"https://api.github.com/repos/substack/tape/issues/207/labels{/name}","comments_url":"https://api.github.com/repos/substack/tape/issues/207/comments","events_url":"https://api.github.com/repos/substack/tape/issues/207/events","html_url":"https://github.com/substack/tape/issues/207","id":114584813,"number":207,"title":"Connected redis client prevents tests from completing","user":{"login":"jpiulac","id":683721,"avatar_url":"https://avatars.githubusercontent.com/u/683721?v=3","gravatar_id":"","url":"https://api.github.com/users/jpiulac","html_url":"https://github.com/jpiulac","followers_url":"https://api.github.com/users/jpiulac/followers","following_url":"https://api.github.com/users/jpiulac/following{/other_user}","gists_url":"https://api.github.com/users/jpiulac/gists{/gist_id}","starred_url":"https://api.github.com/users/jpiulac/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/jpiulac/subscriptions","organizations_url":"https://api.github.com/users/jpiulac/orgs","repos_url":"https://api.github.com/users/jpiulac/repos","events_url":"https://api.github.com/users/jpiulac/events{/privacy}","received_events_url":"https://api.github.com/users/jpiulac/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"milestone":null,"comments":2,"created_at":"2015-11-02T12:31:27Z","updated_at":"2015-11-02T17:44:13Z","closed_at":null,"body":"Strange problem where the test doesn't finish when a redis client remains connected.\r\n\r\n```javascript \r\nvar test = require('tape');\r\nvar redis = require(\"redis\").createClient();\r\n\r\ntest('this will not finish', function(t) {\r\n  t.plan(1);\r\n  t.equal(true, true);\r\n});\r\n```\r\n\r\n```javascript \r\n//This will work as expected\r\nvar test = require('tape');\r\nvar redis = require(\"redis\").createClient();\r\n\r\ntest('this will finish', function(t) {\r\n  t.plan(1);\r\n  redis.quit();\r\n  t.equal(true, true);\r\n});\r\n```\r\n\r\nUnfortunately I am using the redis client in a module and it's not so straight forward to quit the connection in my tests.\r\n\r\nIn case it helps, this is the declaration at the top of a module i'm having difficulties testing with tape.\r\n\r\n```javascript \r\nvar redisClient = require('redis').createClient(process.env.redis_url || null),\r\n  throttle = require('tokenthrottle-redis')({\r\n    rate: 5,\r\n    window: 60 * 60 * 1000,\r\n    expiry: 60 * 60 * 24,\r\n  }, process.env.use_redis ? redisClient : null);\r\n````\r\n\r\n\r\n\r\n"},"comment":{"url":"https://api.github.com/repos/substack/tape/issues/comments/153096778","html_url":"https://github.com/substack/tape/issues/207#issuecomment-153096778","issue_url":"https://api.github.com/repos/substack/tape/issues/207","id":153096778,"user":{"login":"Raynos","id":479538,"avatar_url":"https://avatars.githubusercontent.com/u/479538?v=3","gravatar_id":"","url":"https://api.github.com/users/Raynos","html_url":"https://github.com/Raynos","followers_url":"https://api.github.com/users/Raynos/followers","following_url":"https://api.github.com/users/Raynos/following{/other_user}","gists_url":"https://api.github.com/users/Raynos/gists{/gist_id}","starred_url":"https://api.github.com/users/Raynos/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/Raynos/subscriptions","organizations_url":"https://api.github.com/users/Raynos/orgs","repos_url":"https://api.github.com/users/Raynos/repos","events_url":"https://api.github.com/users/Raynos/events{/privacy}","received_events_url":"https://api.github.com/users/Raynos/received_events","type":"User","site_admin":false},"created_at":"2015-11-02T17:44:13Z","updated_at":"2015-11-02T17:44:13Z","body":"This is a feature.\r\n\r\nThe tests did not succeed because you leaked a resource.\r\n\r\nResource leaks are bugs"}}