1) The test could fail for a different reason (different bug); I'd like to
be able to skim the stacktrace in the report to make sure it looks like
it's the same bug
2) The bug could get fixed, at which point I'd like it to automatically
pass instead of being skipped until the expiration date.
Right now I can do what I want by writing boilerplate like this:
private void realFooTest() { /* ... */ }
@Test public void fooTest() {
try {
realFooTest();
} catch (Throwable t) {
if (t instanceof ThreadDeath) throw t;
TimeBombSkipException tbse = new TimeBombSkipException("Bug 39518", "2008/03/21");
tbse.initCause(t);
throw tbse;
}
}
... but that's actually quite a bit of boilerplate. It'd be nice if I
could just do this:
@Test(skipOnFail=true) public void fooTest() { /* ...*/ }
or, even better:
@Test
@SkipOnFail(until="2008/03/21", reason="Bug 39518")
public void fooTest() { /* ... */ }
Does this sound useful?
-Dan