You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@openwhisk.apache.org by GitBox <gi...@apache.org> on 2019/02/15 04:27:39 UTC

[GitHub] tysonnorris commented on a change in pull request #4281: Make intermittently failing concurrencyTests more stable.

tysonnorris commented on a change in pull request #4281: Make intermittently failing concurrencyTests more stable.
URL: https://github.com/apache/incubator-openwhisk/pull/4281#discussion_r257101250
 
 

 ##########
 File path: tests/dat/actions/concurrent.js
 ##########
 @@ -17,6 +19,10 @@ function main(args) {
             setTimeout(function() {
                 checkRequests(args, resolve, reject);
             }, interval);
+        }).finally(() => {
+            // Before leaving the container, decrement the counter again. But wait twice the interval, before decrementing it. Otherwise, the
+            // other requests might not realise, that all requests were inside the container.
+            setTimeout(() => counter--, 2 * interval);
 
 Review comment:
   Is there any reason not to:
   - remove the finally (and the `setTimeout` within)
   - add `counter=0;` to immediately before `resolve(result)` (within `checkRequests`)
   ?
   This way there is no timing issue (potentially racing pause grace timeout), and the counter always gets reset unless a reject occurs. 
   

----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on GitHub and use the
URL above to go to the specific comment.
 
For queries about this service, please contact Infrastructure at:
users@infra.apache.org


With regards,
Apache Git Services