Attempt to fix intermittent failures in testing
Merge pull request #386 from yurydelendik/promises-order

Attempt to fix intermittent failures in testing