Skip to content

test: boost unit tests don't handle assert very well #16700

@maflcko

Description

@maflcko

When running into an assert failure, the boost unit test framework does not shut down cleanly. It does not call the BasicTestingSetup destructor. Thus, the test process will never shut down. As a result of that, the failure is never passed back to the caller.

On travis, this will result in frustrating and hard-to-debug timeouts: E.g. https://travis-ci.org/bitcoin/bitcoin/jobs/575909995#L3584

I see two ways to fix this:

  • Use exceptions instead of assertions, especially in non-validation debug code
  • Teach the boost unit test framework how to handle asserts

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions