-
Notifications
You must be signed in to change notification settings - Fork 12.3k
Closed
Labels
featureNew contracts, functions, or helpers.New contracts, functions, or helpers.testsTest suite and helpers.Test suite and helpers.
Description
🎉 Description
I'm running your test suite against the RSKj 0.5.0 node and found an issue with some tests.
- 🐛 This is a bug report.
💻 Environment
- OpenZeppelin
masterbranch (commit 6c4c898) - RSK 0.5.0 regtest network
npx truffle test --network rskwith my node listening atlocalhost:4444
📝 Details
Let's take for example the BreakInvariantBounty tests. The it can set reward test fails because sendReward returns immediately, before the block including the transaction is mined. The balance of this.bounty.address hasn't been updated yet and the check fails.
🔢 Code To Reproduce Issue
I ran the test code against the RSK node and it failed consistently.
I also verified that both of these changes make the test pass:
it('can set reward', async function () {
await sendReward(owner, this.bounty.address, reward);
await advanceBlock();
const balance = await ethGetBalance(this.bounty.address);
balance.should.be.bignumber.equal(reward);
});it('can set reward', async function () {
await transactionMined(await sendReward(owner, this.bounty.address, reward));
const balance = await ethGetBalance(this.bounty.address);
balance.should.be.bignumber.equal(reward);
});I could send a PR if you want, let me know.
Thanks!
Metadata
Metadata
Assignees
Labels
featureNew contracts, functions, or helpers.New contracts, functions, or helpers.testsTest suite and helpers.Test suite and helpers.