{"action":"created","issue":{"url":"https://api.github.com/repos/ethereumjs/testrpc/issues/35","repository_url":"https://api.github.com/repos/ethereumjs/testrpc","labels_url":"https://api.github.com/repos/ethereumjs/testrpc/issues/35/labels{/name}","comments_url":"https://api.github.com/repos/ethereumjs/testrpc/issues/35/comments","events_url":"https://api.github.com/repos/ethereumjs/testrpc/issues/35/events","html_url":"https://github.com/ethereumjs/testrpc/issues/35","id":141627217,"number":35,"title":"Intermittent failure when running truffle tests","user":{"login":"area","id":311812,"avatar_url":"https://avatars.githubusercontent.com/u/311812?v=3","gravatar_id":"","url":"https://api.github.com/users/area","html_url":"https://github.com/area","followers_url":"https://api.github.com/users/area/followers","following_url":"https://api.github.com/users/area/following{/other_user}","gists_url":"https://api.github.com/users/area/gists{/gist_id}","starred_url":"https://api.github.com/users/area/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/area/subscriptions","organizations_url":"https://api.github.com/users/area/orgs","repos_url":"https://api.github.com/users/area/repos","events_url":"https://api.github.com/users/area/events{/privacy}","received_events_url":"https://api.github.com/users/area/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"milestone":null,"comments":10,"created_at":"2016-03-17T16:00:09Z","updated_at":"2016-03-29T19:49:04Z","closed_at":null,"body":"I have two very similar tests for a pair of contracts that, when run using `truffle`, one of them intermittently fails. I have a MWE at https://github.com/area/testrpc_bug_reproduce\r\n\r\nThe tests 'never' fail (I looped them for an hour with no failures) when using the python based `eth-testrpc`, which is why I'm reporting this as a bug in `testrpc` rather than `truffle`.\r\n\r\nEverything I've seen points to there being some sort of race condition, unfortunately.\r\n\r\n- Intermittent\r\n- More attempts are required to fail on lower-powered machines where the tests take longer.\r\n\r\nI have put the output when using `truffle test --verbose-rpc` at https://gist.github.com/area/82654cad5db14932c48f for a passing pair of tests and then a run where the intermittent test fails.\r\n\r\nEDIT: I've realised that I have the order of the tests reversed in that gist. https://gist.github.com/area/e67899bc16f61468231f has the output from the tests in the same order as they appear in the repository."},"comment":{"url":"https://api.github.com/repos/ethereumjs/testrpc/issues/comments/203069950","html_url":"https://github.com/ethereumjs/testrpc/issues/35#issuecomment-203069950","issue_url":"https://api.github.com/repos/ethereumjs/testrpc/issues/35","id":203069950,"user":{"login":"tcoulter","id":92629,"avatar_url":"https://avatars.githubusercontent.com/u/92629?v=3","gravatar_id":"","url":"https://api.github.com/users/tcoulter","html_url":"https://github.com/tcoulter","followers_url":"https://api.github.com/users/tcoulter/followers","following_url":"https://api.github.com/users/tcoulter/following{/other_user}","gists_url":"https://api.github.com/users/tcoulter/gists{/gist_id}","starred_url":"https://api.github.com/users/tcoulter/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/tcoulter/subscriptions","organizations_url":"https://api.github.com/users/tcoulter/orgs","repos_url":"https://api.github.com/users/tcoulter/repos","events_url":"https://api.github.com/users/tcoulter/events{/privacy}","received_events_url":"https://api.github.com/users/tcoulter/received_events","type":"User","site_admin":false},"created_at":"2016-03-29T19:49:04Z","updated_at":"2016-03-29T19:49:04Z","body":"Update (here for posterity): Using the changes on my machine, which I hope to upload to the test repo, you can reproduce the error deterministically by starting the TestRPC with the following parameters:\r\n\r\n```\r\n$ ./bin/testrpc -m \"fat family plate raw violin boring spread income swim ethics tenant liberty\"\r\n\r\n(and then in a different terminal)\r\n$ while ../truffle/cli.js test; do :; done\r\n```\r\n\r\nFor me, it fails on the first test run, and always fails.\r\n\r\nAs well, using a different mnemonic, you can have the first run pass but the second one fail, if you want to compare a passing then failing test:\r\n\r\n```\r\n$ ./bin/testrpc -m \"rule time service awful dog bicycle rescue repair robot goose patrol target\"\r\n\r\n(and then in a different terminal)\r\n$ while ../truffle/cli.js test; do :; done\r\n```\r\n\r\nIt turns out the deterministic addresses created produce the erroneous behavior 100% of the time."}}