First stab at adding support for tests timeout#80
First stab at adding support for tests timeout#80DmitrySharabin wants to merge 12 commits intomainfrom
Conversation
✅ Deploy Preview for h-test ready!
To edit notification comments on pull requests, go to your Netlify site configuration. |
d7a7d12 to
0b0123d
Compare
LeaVerou
left a comment
There was a problem hiding this comment.
Wait why are we adding another option instead of fixing maxTime?
After thinking about this a bit more, I agree that we probably don't need another global option. I see some use cases that should be considered, though.
The more I think about it, the more I lean towards not re-purposing |
I don't understand. I would expect that if a test has |
For now, if a test has htest/src/classes/TestResult.js Line 118 in 6e988f1 Now I see the actual bug that should be fixed and why it didn't work when I tried limiting the time for test execution. Hm. Let me update the code to address it. |
0df5496 to
1fc93eb
Compare
f9a993a to
4cb4651
Compare
|
It turned out that setting a timeout via This is my first time working with |
At first glance, this seems like a very complicated solution to this problem. If the issue is that we need to externally reject the promise, we can perhaps wrap the promise and do something like this or use |
Oh, that's a very nice idea. Let me try to use it. By the way, I started to recognize this pattern in our projects. It's time to internalize it. 🙂 |
7a0e1ed to
5c9d773
Compare
We need to be able to abort (for real) the test execution on time out.
5c9d773 to
b7cc1e3
Compare
We just need to ensure that only one promise is resolved by the required time and the properties are set.
0cb67fa to
bd83528
Compare
|
After some more trials and errors, I think I could find exactly where set Could you please give this PR another look? |
It's still not enough. 🤦♂️ Even though a promise resolved on timeout might have precedence, the promise running the test is not aborted. When it is, it updates some properties of the test that should not be updated, such as |

No description provided.