Files
triangles_v5/src
Krystie 175abcd8a4 test: ResetChainDBStatics() helper to fix chaindb_wipe test isolation
The chaindb_wipe test suite runs after chaindb_backend_selection and
rocksdb_wrapper, both of which leave the process-wide static g_rocksdb
(and on some paths the leveldb txdb singleton) alive. A leaked
g_rocksdb means the next test that does MakeChainDB('cr+') may get a
path that the prior test's open handle is still serving — leading to
the test operating on stale state and the on-disk wipe having no
effect. The H1 crashed_migration_marker_triggers_retry test
specifically could not bootstrap a fresh txleveldb/ for the migration
because the leveldb handle from the prior test was still bound.

This is the same class of bug as W2 (live LevelDB iterator outliving
the DB close) but at the test binary's process-lifetime scale: a live
DB handle from a prior test leaks into the next test and the on-disk
wipe is a no-op.

Fix: add a ResetChainDBStatics() helper that explicitly opens + closes
both backends (in create-if-missing mode so it works whether or not a
prior test left a DB on disk) and then wipes the on-disk chain DB
directories. Call it at the top of every chaindb_wipe test.

Before: 2/4 chaindb_wipe tests passing (H1 retry, H4 happy path) due
to the static-state leak. The crashes were also producing spurious
SIGABRTs at process exit from the static VersionSet assertion.

After: 20/20 chaindb_runtime tests pass, 3/3 chaindb_equivalence,
14/14 snapshotnet.

One file, +52 lines, no production code changes.
2026-07-02 01:38:18 -07:00
..
2014-10-05 23:37:30 +02:00
2014-10-05 23:37:30 +02:00
2014-07-16 16:05:09 -07:00
2014-07-16 16:05:09 -07:00
2014-07-16 16:05:09 -07:00
2014-07-16 16:05:09 -07:00
2014-07-16 16:05:09 -07:00
2014-07-16 16:05:09 -07:00
2014-07-16 16:05:09 -07:00
2014-07-16 16:05:09 -07:00
2014-07-16 16:05:09 -07:00
2014-07-16 16:05:09 -07:00
2014-07-16 16:05:09 -07:00
2014-07-16 16:05:09 -07:00
2014-07-16 16:05:09 -07:00
2014-10-05 23:37:30 +02:00
2014-07-16 16:05:09 -07:00
2014-10-05 23:37:30 +02:00
2014-10-05 23:37:30 +02:00
2014-07-16 16:05:09 -07:00
2014-07-16 16:05:09 -07:00
2014-10-05 23:37:30 +02:00
2026-05-10 02:33:40 -07:00
2014-07-21 20:07:07 -07:00
2015-07-28 15:59:06 +02:00
2014-10-05 23:37:30 +02:00
2014-07-16 16:05:09 -07:00
2014-10-05 23:37:30 +02:00
2014-07-16 16:05:09 -07:00
2014-07-16 16:05:09 -07:00
2014-07-16 16:05:09 -07:00
2014-07-16 16:05:09 -07:00
2014-07-16 16:05:09 -07:00
2014-07-16 16:05:09 -07:00
2014-07-16 16:05:09 -07:00
2014-07-16 16:05:09 -07:00
2014-07-16 16:05:09 -07:00
2014-10-05 23:37:30 +02:00
2014-07-16 16:05:09 -07:00
2014-07-16 16:05:09 -07:00
2014-07-16 16:05:09 -07:00
2014-07-16 16:05:09 -07:00
2014-07-16 16:05:09 -07:00
2014-07-16 16:05:09 -07:00
2014-07-16 16:05:09 -07:00
2026-06-29 20:08:06 -07:00
2014-10-05 23:37:30 +02:00