Skip to content

Flaky test in MockERC20YearnVault: Expected "1000000099991" to be equal 1000000099996 #240

@cameel

Description

@cameel

I'm seeing one of the tests fail from time to time. It doesn't always happen but does often enough to be noticeable. I've seen at least 6 cases in the last few days: 957293, 955718, 954761, 954426, 954379, 954343.

I can't exclude the possibility that it's actually caused by something in the compiler (the way I run it, I'm forcing your code to run with latest solc) or in the way I run it but since it happens only occasionally, some slight non-determinism in JS test logic seems more likely to me.

Failing test output

 154 passing (5m)
  1 failing

  1) MockERC20YearnVault
       deposit - withdraw with rewards unlock
         correctly handles deposits and withdrawals:

      AssertionError: Expected "1000000099991" to be equal 1000000099996
      + expected - actual

       {
      -  "_hex": "0xe8d4a6969c"
      +  "_hex": "0xe8d4a69697"
         "_isBigNumber": true
       }
      
      at Context.<anonymous> (test/mockERC20YearnVaultTest.ts:183:58)
      at runMicrotasks (<anonymous>)
      at processTicksAndRejections (node:internal/process/task_queues:96:5)
      at runNextTicks (node:internal/process/task_queues:65:3)
      at listOnTimeout (node:internal/timers:526:9)
      at processTimers (node:internal/timers:500:7)

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions