omgnetwork / ewallet

eWallet Backend for the OmiseGO SDKs.
https://omisego.network/
Apache License 2.0
324 stars 74 forks source link

Fix flaky tests in "eth_blockchain" #1203

Open kalouo opened 4 years ago

kalouo commented 4 years ago

Describe the bug

The eth_blockchain test suite is failing on CI and on local occasionally.

It fails more on my machine than @T-Dnzt's (which is more performant) suggesting it may be related to computational resources.

To Reproduce

  1) test mint_erc20/2 generates a mint transaction (EthBlockchain.TransactionTest)
     test/eth_blockchain/transaction_test.exs:73
     Assertion with == failed
     code:  assert Encoding.to_hex(sender_public_key) == "0x" <> state[:public_key]
     left:  "0x04895ae99bca79f5675643c089374def9c11849885ecdccc2ce1e2bc130c26c4c4f0600795212ae98bc53c6d8bd3982e57838df86f0bfac6662fdd294b8af9f07c"
     right: "0x04d84dc0278a35ef74e763a6728c061d2179110da4d53b99631b717bfc376cddef8c213b2c1671afc6a3207a7bced0a16c62511a6073c6de85d6a712d41cd26961"
     stacktrace:
       test/eth_blockchain/transaction_test.exs:93: (test)

Expected behavior

Additional context