Use @Test parameter `timeout` or use TestRule `Timeout` to limit the time.