3

We have contract test suites running against TestRPC, it could fail the first run and succeed the consecutive second run. What can cause this weird behavior and how can I fix it?

The CI histories:

Thanks in advanced!

6

I think it's the same problem as here. When performing many operations in a short period of time, it's still neccessary to give testRPC a break here and there. Of course it can also be the case, that your testing code leads to racing conditions, which might not neccessarily be obvious or syntactical errors. It's hard to tell without the code, of course, but as long it runs on a testnet, you shouldn't have to worry that much. Of course, again, it depends also on the way your contracts are designed, for example, as one cannot guarantee that this specific scenario won't ever pop up under real conditions on the mainnet without knowing the details.

EDIT: As of Solidity 0.4.9, bad opcode is used for internal throws, like array out of bounds. So in your case, i'm pretty sure there is some condition in your testcode that makes the testes sometimes "try to do things", which are not intended to yet. Might be something is not properly promise-chained but sometimes being there just in time anyway.

Good Luck !

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.