[tests] Fix abandonconflict.py intermittency #10344

pull jnewbery wants to merge 1 commits into bitcoin:master from jnewbery:fix_abandon_conflict changing 1 files +4 −5
  1. jnewbery commented at 5:06 PM on May 5, 2017: member

    abandonconflict.py intermittently fails (about 1 time out of 25 for me). The failure is caused by a race between shutting down node0 and a transaction being INV'ed from node0 and getting into node1's mempool.

    The original intent was that node0 and node1 should be disconnected before sending the transaction in node0. However, the call to disconnectnode() doesn't actually disconnect the nodes because there are two P2P connections between node0 and node1 (connect_nodes_bi() madness).

    This PR change the direct call to disconnectnode() into a call to the test_framework/util function disconnect_nodes() which fully disconnects the nodes. It also asserts that node1's mempool is empty after stop-starting node0. @TheBlueMatt

  2. [tests] Fix abandonconflict.py intermittency 965a124427
  3. TheBlueMatt commented at 5:20 PM on May 5, 2017: member

    utACK 965a12442746e99247e5ce0f43fba8e3e149cae4 I imagine this should fix some random travis failures I've seen on a few of my PR, thanks.

  4. fanquake added the label Tests on May 5, 2017
  5. paveljanik commented at 9:28 AM on May 6, 2017: contributor

    Short version: ACK https://github.com/bitcoin/bitcoin/pull/10344/commits/965a12442746e99247e5ce0f43fba8e3e149cae4

    Long one:

    I have done thorough testing of this functional test script by 1000 runs on the master and this PR with

    for i in `seq 1000`; do echo $i; ./abandonconflict.py > log.$i 2>&1; done
    

    31 out of 1000 runs finished with:

    2017-05-05 22:39:40.681000 TestFramework (INFO): Initializing test directory /var/folders/65/fn0h49r55k7779vg1b_h461r0000gn/T/testt_rlp1fk/46953
    2017-05-05 22:39:55.575000 TestFramework (ERROR): JSONRPC error
    Traceback (most recent call last):
      File "/private/tmp/bitcoin-master/test/functional/test_framework/test_framework.py", line 144, in main
        self.run_test()
      File "./abandonconflict.py", line 139, in run_test
        self.nodes[1].sendrawtransaction(signed["hex"])
      File "/private/tmp/bitcoin-master/test/functional/test_framework/coverage.py", line 46, in __call__
        return_val = self.auth_service_proxy_instance.__call__(*args, **kwargs)
      File "/private/tmp/bitcoin-master/test/functional/test_framework/authproxy.py", line 153, in __call__
        raise JSONRPCException(response['error'])
    test_framework.authproxy.JSONRPCException: 258: txn-mempool-conflict (-26)
    2017-05-05 22:39:55.576000 TestFramework (INFO): Stopping nodes
    2017-05-05 22:40:00.121000 TestFramework (WARNING): Not cleaning up dir /var/folders/65/fn0h49r55k7779vg1b_h461r0000gn/T/testt_rlp1fk/46953
    2017-05-05 22:40:00.121000 TestFramework (ERROR): Test failed. Test logging available at /var/folders/65/fn0h49r55k7779vg1b_h461r0000gn/T/testt_rlp1fk/46953/test_framework.log
    

    This PR fixes this particular issue.

    Other than this issue, there were 10 instances of TypeError: NoneType object is not iterable (https://github.com/bitcoin/bitcoin/issues/9317#issuecomment-284960894) and 5 instances of socket.timeout: timed out error.

  6. MarcoFalke merged this on May 6, 2017
  7. MarcoFalke closed this on May 6, 2017

  8. MarcoFalke referenced this in commit e9274839bf on May 6, 2017
  9. ftrader referenced this in commit f6c2ca5488 on May 15, 2017
  10. ftrader referenced this in commit 6346c62e77 on May 15, 2017
  11. ftrader referenced this in commit 8a0c4fd97e on May 15, 2017
  12. jnewbery deleted the branch on May 16, 2017
  13. luke-jr referenced this in commit ea7e5147b6 on Jun 3, 2017
  14. PastaPastaPasta referenced this in commit a0b6de0b4e on Jun 10, 2019
  15. PastaPastaPasta referenced this in commit 78eb07dd97 on Jun 10, 2019
  16. PastaPastaPasta referenced this in commit b51e314fe9 on Jun 10, 2019
  17. PastaPastaPasta referenced this in commit 98eb064bce on Jun 11, 2019
  18. PastaPastaPasta referenced this in commit 3436ec3004 on Jun 11, 2019
  19. PastaPastaPasta referenced this in commit ee9def5cc9 on Jun 15, 2019
  20. PastaPastaPasta referenced this in commit 84807eb710 on Jun 19, 2019
  21. PastaPastaPasta referenced this in commit 6543d097f7 on Jun 19, 2019
  22. PastaPastaPasta referenced this in commit 6f84303792 on Jun 19, 2019
  23. PastaPastaPasta referenced this in commit 3aad7e20e6 on Jun 19, 2019
  24. PastaPastaPasta referenced this in commit 3a28ec1806 on Jun 19, 2019
  25. PastaPastaPasta referenced this in commit 8c420c2983 on Jun 19, 2019
  26. PastaPastaPasta referenced this in commit 8ef273ba77 on Jun 19, 2019
  27. PastaPastaPasta referenced this in commit 546d49b32c on Jun 20, 2019
  28. barrystyle referenced this in commit 9530e65be0 on Jan 22, 2020
  29. DrahtBot locked this on Sep 8, 2021

github-metadata-mirror

This is a metadata mirror of the GitHub repository bitcoin/bitcoin. This site is not affiliated with GitHub. Content is generated from a GitHub metadata backup.
generated: 2026-04-30 12:15 UTC

This site is hosted by @0xB10C
More mirrored repositories can be found on mirror.b10c.me