When the timeout is timeout, how can I catch the timeout? For example, in TC below, I thought that the catch block would execute after a timeout, but that is not the case. I want to do the same processing after the timeout, as if the TC ended with an exception.
@Rule
public Timeout globalTimeout = new Timeout(3600000);
@Test
public void tc1 throws Exception {
try {
}
catch (Throwable t) {
}
}
source
share