-
Notifications
You must be signed in to change notification settings - Fork 128
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
Converted wysiwyg jasmine file to jest test fixes #784 #785
Conversation
Hi, it looks like, since we recently merged in some new changes to the main branch, you need to rebase your work on top of the latest main. You can do that by following the process outlined here, but you may be able to skip step 2 if your main is still in sync with publiclab's main: https://publiclab.org/wiki/contributing-to-public-lab-software#Rewinding+the+master+branch In general there are more tips and guides on rebasing here: https://publiclab.org/wiki/developers#Resources Thanks! |
Looks like you're seeing real test failures now, not just an error before running. Let me know if you need help with these! |
I ran the tests on my local machine and it all passed. How can I run it here please? |
Sure - it's here: https://github.com/publiclab/PublicLab.Editor/runs/4778470519?check_suite_focus=true#step:7:49 What i do is click the Details link, then click the line in the log with the red error icon and it expands, then i search for "FAIL" to find individual failures. The log is tough to read so the search function really helps! |
One looks like a timeout, which is a little unexpected. Let's try to figure out why the others are true/false failures, and maybe the timeout will resolve itself? We can also just re-run it to see if it was something intermittent if it really is supposed to run smoothly. Finally, we could lengthen the timeout limit to see if it helps! But, my guess is it should be enough time, we're just waiting for local asynchronous code to run, which should be pretty fast. |
This is a bit confusing. Line 49 refers to |
Ah, ok. So these test failures are totally unconnected to this PR. That's usually a signal we should a) restart them and b) look at other unrelated reasons the tests could be flaky, but in a separate issue. Would you mind opening one and linking specifically to this run, so we can check the logs? This URL shouldn't change even if we start the tests over: https://github.com/publiclab/PublicLab.Editor/runs/4778470519 And you can link to this PR as an example of one where this happened. |
Yes, so confirming, this does seem to be intermittent, and unfortunately this time the CustomInsertTest failed:
My guess is we may need to restart it again, but also copy these errors into that new tracking issue and try to work the problem there. I'll also try running it in GitPod to see! |
@@ -0,0 +1,53 @@ | |||
const timeout = process.env.SLOWMO ? 60000 : 10000; |
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.
We can try increasing this to above 10 seconds for all tests...?
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.
Sure we could do that. But may I ask please, why do you think we should increase the timeout? Did you experience any timeout recently?
@jywarren
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.
Based on the message in the logs:
: Timeout - Async callback was not invoked within the 10000 ms timeout specified by jest.setTimeout.Timeout - Async callback was not invoked within the 10000 ms timeout specified by jest.setTimeout.Error:
I am guessing that for some reason it took longer. It's worth a try!
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.
And that was the same as with one of the earlier bold test failures!
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.
Oh ok, I get. I think I got that error sometimes and when I ran the test again it works fine. But it's ok, we could increase the timeout value to say 15000ms or 20000ms.
Is that much or enough, what do you think?
I think if we increase it to 15 or 20 seconds and it doesn't help, then we
at least know that our problem has to be solved another way, and it's not
like we're just a second or two off. 5 or 10 seconds on each of... 6 tests?
Isn't too bad, it's 30-60 seconds overall.
…On Tue, Jan 11, 2022, 6:28 PM Paul Ibeabuchi C. ***@***.***> wrote:
***@***.**** commented on this pull request.
------------------------------
In test/ui-testing/wysiwyg.test.js
<#785 (comment)>
:
> @@ -0,0 +1,53 @@
+const timeout = process.env.SLOWMO ? 60000 : 10000;
Oh ok, I get. I think I got that error sometimes and when I ran the test
again it works fine. But it's ok, we could increase the timeout value to
say 15000ms or 20000ms.
Is that much or enough, what do you think?
—
Reply to this email directly, view it on GitHub
<#785 (comment)>,
or unsubscribe
<https://github.com/notifications/unsubscribe-auth/AAAF6J2R64C52DJ5Z6QQAOLUVS4JZANCNFSM5LWY4NEA>
.
Triage notifications on the go with GitHub Mobile for iOS
<https://apps.apple.com/app/apple-store/id1477376905?ct=notification-email&mt=8&pt=524675>
or Android
<https://play.google.com/store/apps/details?id=com.github.android&referrer=utm_campaign%3Dnotification-email%26utm_medium%3Demail%26utm_source%3Dgithub>.
You are receiving this because you were mentioned.Message ID:
***@***.***>
|
Alright. Lastly, can we try running that particular test again here? |
OK, i just pushed a commit lengthening all Jest test timeouts to 15 seconds instead of 10. Let's see... 🤞 |
Well, 15 seconds doesn't seem to have worked :-( This is weird because it just started happening, right? A variety of earlier PRs didn't see this issue? I'm going to check if somehow there's an error happening inside the async test and not getting logged out. Maybe it's not a timeout but an error somehow... |
I think our next step is to research what's causing this timeout error. I started searching in https://github.com/facebook/jest/search?q=Timeout+-+Async+callback+was+not+invoked+within&type=issues - and bearing in mind https://jestjs.io/docs/asynchronous I can try again later in the week! |
…liclab/PublicLab.Editor into wysiwyg-jest-test-conversion Pulled changes from remote wysiwyg branch to local branch
The PRs I created didn't have this issues and also my local tests passes as well. Where are you seeing these? I'm a little confused 🤕 |
Just copying in a note here:
|
Ideas
|
Super well done! This was a tough and mysterious one but you did great. 🎉 |
Make sure these boxes are checked before your pull request (PR) is ready to be reviewed and merged. Thanks!
grunt jasmine
fixes #0000
-style reference to original issue #@publiclab/reviewers
for help, in a comment belowIf tests do fail, click on the red
X
to learn why by reading the logs.Please be sure you've reviewed our contribution guidelines at https://publiclab.org/contributing-to-public-lab-software
We have a loose schedule of reviewing and pulling in changes every Tuesday and Friday, and publishing changes on Fridays.
Thanks!