-
-
Notifications
You must be signed in to change notification settings - Fork 367
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
Improve hls class plugin test #4059
Improve hls class plugin test #4059
Conversation
94cf26e
to
5bee014
Compare
This comment was marked as off-topic.
This comment was marked as off-topic.
708de54
to
5bee014
Compare
@@ -124,7 +124,7 @@ codeLensTests = testGroup | |||
, testCase "Do not construct error action!, Ticket3942one" $ do | |||
runSessionWithServer def classPlugin testDataDir $ do | |||
doc <- openDoc "Ticket3942one.hs" "haskell" | |||
_ <- waitForDiagnosticsFromSource doc (T.unpack sourceTypecheck) |
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.
This function is rather weird. I don't know why it isn't just a slight variant of waitForDiagnostics
that adds an extra predicate...
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.
Should we just get rid of waitForDiagnosticsWithSource
entirely? It seems like it's going to introduce unconditional waits everywhere, which seems pretty bad!
This one has a timeout, and something I am not so sure about. It seems some test rely on the timeout. |
Okay, well maybe let's at least note it down as something to investigate in #3736 |
I don't think we need to pass in the source to match the result, since its result is throwed away.
switching from
waitForDiagnosticsFromSource
towaitForDiagnosticsFrom
improve the test speed by magnitude.before
All 29 tests passed (88.71s)
after
All 29 tests passed (5.74s)