Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Randomly wrong order of magnitude in balance tests #135

Open
legobeat opened this issue May 23, 2024 · 1 comment
Open

Randomly wrong order of magnitude in balance tests #135

legobeat opened this issue May 23, 2024 · 1 comment

Comments

@legobeat
Copy link
Contributor

legobeat commented May 23, 2024

This occurs randomly in CI, and has been for some time. I can not say I'm sure this was ever not happening:

# HumanStandardToken balance changes are emitted
eth_call
eth_call
eth_call
eth_blockNumber
eth_call
not ok 11 initial balance loaded from last test
  ---
    operator: equal
    expected: '8.9'
    actual:   '890'
    at: TokenTracker.<anonymous> (/home/runner/work/eth-token-tracker/eth-token-tracker/test/integration/human-standard-token.js:143:16)
    stack: |-
      Error: initial balance loaded from last test
          at Test.assert [as _assert] (/home/runner/work/eth-token-tracker/eth-token-tracker/node_modules/tape/lib/test.js:312:48)
          at Test.bound [as _assert] (/home/runner/work/eth-token-tracker/eth-token-tracker/node_modules/tape/lib/test.js:95:17)
          at Test.strictEqual (/home/runner/work/eth-token-tracker/eth-token-tracker/node_modules/tape/lib/test.js:476:7)
          at Test.bound [as equal] (/home/runner/work/eth-token-tracker/eth-token-tracker/node_modules/tape/lib/test.js:95:17)
          at TokenTracker.<anonymous> (/home/runner/work/eth-token-tracker/eth-token-tracker/test/integration/human-standard-token.js:143:16)
          at safeApply (/home/runner/work/eth-token-tracker/eth-token-tracker/node_modules/@metamask/safe-event-emitter/index.js:6:17)
          at TokenTracker.emit (/home/runner/work/eth-token-tracker/eth-token-tracker/node_modules/@metamask/safe-event-emitter/index.js:54:13)
          at TokenTracker._update (/home/runner/work/eth-token-tracker/eth-token-tracker/lib/index.js:106:10)
          at TokenTracker.updateBalances (/home/runner/work/eth-token-tracker/eth-token-tracker/lib/index.js:62:12)
  ...

As can be seen in that CI run, the same test that fail in the Node.js 18 run passes on both 16 and 20. If retried, it will usually pass. Not currently clear if this is an actual bug or just an issue with the test setup.

Related

@mcmire
Copy link
Contributor

mcmire commented May 24, 2024

Interesting. Well, this is not surprising to me. The tests in this repo have not been audited, so there is a chance that they are not written well or are not doing the right thing.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants