Giter VIP home page Giter VIP logo

Comments (4)

dylanjw avatar dylanjw commented on August 17, 2024

Are you by any chance sharing the setUpTestData method between your two test cases through inheritance?

from eth-tester.

artemistomaras avatar artemistomaras commented on August 17, 2024

@dylanjw no. My two test cases reside in different files with a setUpTestData in each one.

from eth-tester.

artemistomaras avatar artemistomaras commented on August 17, 2024

After more fiddling around I found the following:

  1. Running the tests in reverse order (with -r flag) I still get the same issue
  2. Running the tests in parallel (with --parallel flag), my test get executed without an issue
(uport_relay_server) artemis@artemis-pc:~/PycharmProjects/uport_relay_server$ python3 manage.py test --parallel --settings=uport_relay_server.settings.test

Failed to import bitcoin. This is not a fatal error but does
mean that you will not be able to determine the address from
your wallet file.
Creating test database for alias 'default'...
Cloning test database for alias 'default'...
Cloning test database for alias 'default'...
System check identified no issues (0 silenced).
Initializing chain from provided state
Initializing chain from provided state
Initializing chain from provided state
Initializing chain from provided state
INFO:eth.block  Block pre-sealed, 21000 gas used
INFO:eth.block  Block pre-sealed, 21000 gas used
INFO:eth.chain  Adding to head head=c6745cf3
INFO:eth.chain  Adding to head head=c6745cf3
Saved 3 address change logs
Saved 3 address change logs
INFO:eth.chain  Added block 1 (211e11df) with 1 txs and 21000 gas
INFO:eth.chain  Added block 1 (211e11df) with 1 txs and 21000 gas
INFO:eth.block  Block pre-sealed, 470791 gas used
INFO:eth.block  Block pre-sealed, 470791 gas used
INFO:eth.chain  Adding to head head=211e11df
INFO:eth.chain  Adding to head head=211e11df
Saved 2 address change logs
INFO:eth.chain  Added block 2 (404f8090) with 1 txs and 470791 gas
Saved 2 address change logs
INFO:eth.chain  Added block 2 (404f8090) with 1 txs and 470791 gas
INFO:eth.block  Block pre-sealed, 1641161 gas used
INFO:eth.block  Block pre-sealed, 1641161 gas used
INFO:eth.chain  Adding to head head=404f8090
INFO:eth.chain  Adding to head head=404f8090
Saved 2 address change logs
INFO:eth.chain  Added block 3 (c5ab0a92) with 1 txs and 1641161 gas
Saved 2 address change logs
INFO:eth.chain  Added block 3 (c5ab0a92) with 1 txs and 1641161 gas
INFO:eth.block  Block pre-sealed, 505467 gas used
INFO:eth.block  Block pre-sealed, 505467 gas used
INFO:eth.chain  Adding to head head=c5ab0a92
INFO:eth.chain  Adding to head head=c5ab0a92
Saved 2 address change logs
INFO:eth.chain  Added block 4 (4c0ccfe2) with 1 txs and 505467 gas
Saved 2 address change logs
INFO:eth.chain  Added block 4 (4c0ccfe2) with 1 txs and 505467 gas
INFO:eth.block  Block pre-sealed, 283526 gas used
INFO:eth.chain  Adding to head head=4c0ccfe2
INFO:eth.block  Block pre-sealed, 283526 gas used
Saved 4 address change logs
INFO:eth.chain  Added block 5 (51fb8023) with 1 txs and 283526 gas
INFO:eth.chain  Adding to head head=4c0ccfe2
Saved 4 address change logs
INFO:eth.chain  Added block 5 (51fb8023) with 1 txs and 283526 gas
INFO:eth.block  Block pre-sealed, 283526 gas used
INFO:eth.chain  Adding to head head=4c0ccfe2
Saved 4 address change logs
INFO:eth.chain  Added block 5 (51fb8023) with 1 txs and 283526 gas
INFO:eth.block  Block pre-sealed, 283526 gas used
INFO:eth.chain  Adding to head head=4c0ccfe2
Saved 4 address change logs
INFO:eth.chain  Added block 5 (51fb8023) with 1 txs and 283526 gas
INFO:eth.block  Block pre-sealed, 283526 gas used
INFO:eth.chain  Adding to head head=4c0ccfe2
INFO:eth.block  Block pre-sealed, 283526 gas used
Saved 4 address change logs
INFO:eth.chain  Added block 5 (51fb8023) with 1 txs and 283526 gas
INFO:eth.chain  Adding to head head=4c0ccfe2
Saved 4 address change logs
INFO:eth.chain  Added block 5 (51fb8023) with 1 txs and 283526 gas
INFO:eth.block  Block pre-sealed, 98148 gas used
INFO:eth.chain  Adding to head head=51fb8023
INFO:eth.block  Block pre-sealed, 283526 gas used
INFO:eth.chain  Adding to head head=4c0ccfe2
Saved 7 address change logs
INFO:eth.chain  Added block 6 (288e4f20) with 1 txs and 98148 gas
Saved 4 address change logs
INFO:eth.chain  Added block 5 (51fb8023) with 1 txs and 283526 gas
INFO:eth.block  Block pre-sealed, 283526 gas used
INFO:eth.chain  Adding to head head=4c0ccfe2
Saved 4 address change logs
INFO:eth.chain  Added block 5 (51fb8023) with 1 txs and 283526 gas
INFO:eth.block  Block pre-sealed, 98148 gas used
INFO:eth.chain  Adding to head head=51fb8023
Saved 7 address change logs
INFO:eth.chain  Added block 6 (288e4f20) with 1 txs and 98148 gas
INFO:eth.block  Block pre-sealed, 283526 gas used
INFO:eth.chain  Adding to head head=4c0ccfe2
Saved 4 address change logs
INFO:eth.chain  Added block 5 (51fb8023) with 1 txs and 283526 gas
INFO:eth.block  Block pre-sealed, 283526 gas used
INFO:eth.chain  Adding to head head=4c0ccfe2
Saved 4 address change logs
INFO:eth.chain  Added block 5 (51fb8023) with 1 txs and 283526 gas
INFO:eth.block  Block pre-sealed, 283526 gas used
INFO:eth.chain  Adding to head head=4c0ccfe2
INFO:eth.block  Block pre-sealed, 98148 gas used
Saved 4 address change logs
INFO:eth.chain  Added block 5 (51fb8023) with 1 txs and 283526 gas
INFO:eth.chain  Adding to head head=51fb8023
Saved 7 address change logs
INFO:eth.chain  Added block 6 (288e4f20) with 1 txs and 98148 gas
INFO:eth.block  Block pre-sealed, 283526 gas used
INFO:eth.chain  Adding to head head=4c0ccfe2
Saved 4 address change logs
INFO:eth.chain  Added block 5 (51fb8023) with 1 txs and 283526 gas
INFO:eth.block  Block pre-sealed, 98148 gas used
INFO:eth.chain  Adding to head head=51fb8023
Saved 7 address change logs
INFO:eth.chain  Added block 6 (288e4f20) with 1 txs and 98148 gas
......INFO:eth.block    Block pre-sealed, 98148 gas used
INFO:eth.chain  Adding to head head=51fb8023
Saved 7 address change logs
INFO:eth.chain  Added block 6 (288e4f20) with 1 txs and 98148 gas
......
----------------------------------------------------------------------
Ran 12 tests in 2.353s

OK
Destroying test database for alias 'default'...
Destroying test database for alias 'default'...
Destroying test database for alias 'default'...

from eth-tester.

dylanjw avatar dylanjw commented on August 17, 2024

@artemistomaras Do you get the same issue using the PyEVMBackend instead of the PyEthereum21Backend? The fact that running with the --parallel works seems to indicate something is getting screwed up by running the two test cases in the same process. Can you set a break point before the failure, and poke around to see if the chain state is what you would expect at that point in the test? Do any transactions submitted at the break point remain unmined, or is it just the one that is getting lost?

from eth-tester.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.