tdb: new test, cleanup old tests by centralizing lock tracking.