I have scenario when i need to use sleep. But when I run this function I get ERROR. It working previously, but I didn't run this test long time ago and when I run this test again I get this error. This is one of my scenarios:
Scenario: test sleep
* def sleep = function(pause){ java.lang.Thread.sleep(pause*1000) }
* url 'http://someURL:8080/api/v1/'
Given path 'endpoint/' + 470538
When method get
Then status 200
* call sleep(20)
Sleep function looks like working, but in the end of test I get test fail:
not a callable feature or js function: [type: NULL, value: null]
Could you help me please to resolve this issue?