unit tests: Avoid side effects #12428

issue MarcoFalke opened this issue on February 13, 2018
  1. MarcoFalke commented at 10:04 PM on February 13, 2018: member

    To the best of my knowledge, none of the unit test cases has another test case as dependency. In fact, I consider it the safest and cleanest, if none of the unit tests relies on side effects from previous unit tests.

    Bitcoin Core heavily relies on globals, which are exposed to all side effects of test cases (even in completely different test suites). They might cause non-deterministic bugs, such as #12424.

    I suggest to run each test case in a fresh environment with cleanly initialized globals.

  2. MarcoFalke added the label Tests on Feb 13, 2018
  3. MarcoFalke commented at 12:11 PM on March 24, 2018: member

    Running each test separately could also be used to run all of them in parallel (similar to how the functional tests are run in parallel)

  4. MarcoFalke commented at 4:11 PM on March 28, 2018: member

    Will push a branch soon

  5. MarcoFalke closed this on Mar 28, 2018

  6. 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-17 06:15 UTC

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