[qa] Attach node index to test_node AssertionError and print messages #13022

pull jamesob wants to merge 1 commits into bitcoin:master from jamesob:2018-04-18-func-test-debug-log changing 1 files +24 −13
  1. jamesob commented at 7:21 PM on April 18, 2018: member

    In the midst of fighting with #12873 it became apparent that there're a number of assertions and print statements which are emitted by test nodes but don't identify the node in question. This change makes debugging a bit easier by adding identifying information to non-logger test_node-related error messages.

  2. jamesob force-pushed on Apr 18, 2018
  3. Empact commented at 9:27 PM on April 18, 2018: member

    utACK da93b39

    A few style nits (ymmv):

    • _with_node_id feels like an implementation detail to me. A name like _node_msg could be clear without being overly so.
    • For raise_assertion - I'd either remove the indirection or apply it to all raises on the object, given they all use the node id treatment.
  4. fanquake added the label Tests on Apr 18, 2018
  5. jamesob force-pushed on Apr 19, 2018
  6. jamesob commented at 2:13 PM on April 19, 2018: member

    @Empact thanks for the review. I've incorporated your good feedback.

  7. jamesob force-pushed on Apr 19, 2018
  8. [qa] Attach node index to test_node AssertionError and print messages
    to aid debugging. Feedback incorporated from @Empact.
    80a5e59532
  9. jamesob force-pushed on Apr 19, 2018
  10. skeees commented at 1:40 PM on April 22, 2018: contributor

    concept ACK might also be useful to print out the ports that each node{k} is on - afaict those aren't printed anywhere - and very useful as each bitcoind log identifies peer by a different index and the only way that i'm aware of to tie these to the python test framework indexing is by port num

  11. conscott commented at 12:45 PM on April 23, 2018: contributor

    utACK 80a5e59532925a3445f523a8b3bc29e2e11e8848

  12. laanwj merged this on Apr 24, 2018
  13. laanwj closed this on Apr 24, 2018

  14. laanwj referenced this in commit 896a9d026c on Apr 24, 2018
  15. PastaPastaPasta referenced this in commit effe6d1263 on Nov 10, 2020
  16. PastaPastaPasta referenced this in commit 90d076846c on Nov 12, 2020
  17. PastaPastaPasta referenced this in commit 90038da3d9 on Nov 17, 2020
  18. MarcoFalke 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-13 21:15 UTC

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