public class TestClass { @Rule public JenkinsRule jenkinsRule = new JenkinsRule();
@WithTimeout(1500)@Testpublic void test() throws Exception{//Lines of code which are taking time}}
WARNING: Test timed out (after 180 seconds).
public class TestClass { @Rule public JenkinsRule jenkinsRule = new JenkinsRule(); public TestClass ()
{ jenkinsRule.timeout=1500; } @Test public void test() throws InterruptedException { Thread.sleep(181_000); } }
In this case value of seconds is just changing in log message only. Test is still failing in 180 seconds.
Log Message:WARNING: Test timed out (after 1500 seconds).Is there any other solution to increase test timeout??