Hello,
I've been experimenting with the new features offered by [email protected], next.16 and next.17. These include native web3.js 1.0.0-beta.36 (that supports the new ABIEncoderV2) and Solidity v0.5.0 (solc-js).
Moving from [email protected] to [email protected] I noticed that my tests were not running anymore. Compilation and migration was working great, but truffle test stopped after the deployment. I suspect a snapshot issue.
With help from the truffle gitter, we realised the tests are working with the truffle develop which lead us to suspect my ganache environment. Rolling back ganache to 6.1.8 solved all my problems.
How to reproduce:
run truffle test with:
@Amxx, does [email protected] run your tests when you use [email protected]?
[email protected] + [email protected] run the tests
I am seeing the same behavior. Working with the current version of Truffle gives me no issues but when I try to upgrade. I am running into issuing Ganache.
I am also running into this: my unit tests run fine with Ganache CLI v6.1.8 (ganache-core: 2.2.1) but fail with Ganache CLI v6.2.3 (ganache-core: 2.3.1) (here)
It seems that the contracts are not freshly deployed for each unit test file, but only once.
Downgrading and pinning to trufflesuite/ganache-cli:v6.1.8 for now.
Thanks @Amxx for reporting and @oberstet for the additional information. The latest ganache-core v2.3.1 had a large number of changes, we're still working on ironing out some bugs that were introduced in the process.
I wrote a few trivial contracts/tests to explore this issue however I'm unable to reproduce it. If possible, please provide a link to a live example, or an unambiguous set of steps/code to reproduce this bug.
@nicholasjpaterno This might be the underlying issue https://github.com/trufflesuite/ganache-cli/issues/603
I have a similar problem. I just updated from ganache from 6.1.8 to 6.2.3 (I'm using web3 1.0.0-beta.36) and my tests just stopped in the middle. After waiting enough time I get the error: transaction was not mined within 50 blocks. I do not use snapshots.
@nicholasjpaterno this repo https://github.com/xbr/xbr-protocol has a set of contracts and test cases that work with 6.1.8 (https://travis-ci.org/xbr/xbr-protocol), but break with 6.2.3. To test:
make run_ganache_cli (uses docker-compose to boot 6.1.8)make deploymake testThanks @MoMannn, for reporting! We were not expecting any breaking changes for this release.
@oberstet thank you for the additional info. I will look into this asap!
@oberstet we really appreciate the tests. @eshaben and I were able to verify/observe the problems described here.
@Amxx, @oberstet, @maxsam4, @MoMannn Can you try the latest ganache-cli@beta (v6.2.4-beta.1) and let us know if you're still experiencing this issue during your unit tests?
Fixed in [email protected].
@nicholasjpaterno awesome, thanks! I can confirm: just rerun our tests with 6.2.4 (docker) and it works
Most helpful comment
@nicholasjpaterno awesome, thanks! I can confirm: just rerun our tests with 6.2.4 (docker) and it works