openui5
openui5 copied to clipboard
sap.ui.test.autowaiter._timeoutWaiter.js maxDelay is a constant
The autowaiter is used for OPA5
and wdi5
to synchronize tests with the application under test. There is a TimeoutWaiter which watches for ongoing setTimeout
calls. In the TimeoutWaiter
the maximum timeout is not defined by the passed options. Instead it is defined via hardcoded values here.
The result is that the autowaiter
does not recognize any timeout which is longer than 1011
ms.
Thanks @Siolto. I have created an internal incident DINC0035026. The responsible owners will get in touch with you here on github.
Hi @Siolto,
I'll discuss this feature request with our PO. In the meantime, I checked that some [undocumented] support for configuring the maxDelay parameter of the timeoutWaiter already exists, please check: https://jsbin.com/kugakedogu/edit?html,output
Note, however, that once you extend the configuration with the custom timeoutWaiter.maxDelay value, it is currently internally remembered has to be updated explicitly back to the default [of 1000ms] if needed to restore the default.
As I commented, we'll discuss any improvements and public documentation of this feature and post here updates of the progress.
Thanks and BR!
Hi @Siolto,
After discussion with our PO, we should be able to expose the maxDelay parameter in the API. In fact, the functionality is already available since long, but remained undocumented probably in order to avoid using it outside scope.
Indeed, the parameter should be used with caution and only when really needed. I stumbled upon a similar issue [after changing from the default 1000ms to 10000ms] during testing:
https://jsbin.com/ribisoxuya/1/edit?html,output
The change sometimes caused the autowaiter wait extra 10000ms for an internally (UI5-specific) scheduled delay [of 10000ms] to end:
This particular issue is an extreme case [that probably will not occur in your usage of the maxDelay parameter] but similar cases are possible to occur once we start changing the default.
Since the functionality is already available (only undocumented), I'm curious if it is possible to check on your side if changing the default parameter value solves the issue on your side (if you have a test case available)... to confirm that it is really worth it publicly exposing the parameter?
(When passing the parameter, remember to always pass the value, even if it is the default one of 1000ms, to workaround a temporary bug that we'll fix additionally).
Thanks!
Hello,
Since there is no response from the author for more than 4 weeks I'm closing the ticket.
Kind Regards, Niya