@Test
public void fails_at_most_once_per_thread() throws Throwable {

    runInNewThread("T1", checker::checkCurrentThread);
    try {
        checker.checkCurrentThread();
    } catch (AssertionError e) {
        // ignore first failure
    }
    // should not throw an exception
    checker.checkCurrentThread();
}