-
Notifications
You must be signed in to change notification settings - Fork 3
First stab at adding support for tests timeout #80
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: main
Are you sure you want to change the base?
Conversation
✅ Deploy Preview for h-test ready!
To edit notification comments on pull requests, go to your Netlify site configuration. |
d7a7d12
to
0b0123d
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
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.