When calling Browser.pause() it always errors immediately with geb.waiting.WaitTimeoutException: condition did not pass in 2147483647 seconds (failed with exception).
I suspect this was broken by 19f9edc11a9a33bcb6f887e555db4eec59d84051 when the double Wait#toMilliseconds(Number) was converted to return an int. The pause code calls waitFor with Integer.MAX_VALUE, so the conversion to milliseconds overflows.
Update toMilliseconds to return a long. This is more robust and safer, but more invasive.
Update pause to use a value less than the MAX_VALUE / 1000.
It looks like the test coverage for the pause method - covered in PauseSpec.groovy - does not catch the error because the pause method is called in a separate thread
Below is my full stacktrace (redacted company info, sorry):
geb.waiting.WaitTimeoutException: condition did not pass in 2147483647 seconds (failed with exception)
<at spec method call>
... 7 more
Ant: Apache Ant(TM) version 1.9.9 compiled on February 2 2017
JVM: 1.8.0_144 (Azul Systems, Inc. 25.144-b01)
OS: Mac OS X 10.15.1 x86_64
The text was updated successfully, but these errors were encountered:
Thanks for a high quality bug report, @dforegger. I'm impressed that you made the effort to figure out what the problems are with both production and test code which lead to the issue itself and then allow it slip past the verification. It's highly appreciated and made fixing the test and the issue a breeze.