-
Notifications
You must be signed in to change notification settings - Fork 607
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
Use TestControl
in tests
#2651
Use TestControl
in tests
#2651
Conversation
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.
Looks like the CE3 upgrade has caused one of the io tests to fail on Scala.js /cc @armanbilge
I proposed a fix in #2651 (comment). |
I can apply the patch 843ff4a if we agree on it. Speaking for myself - I see no problem with it. |
I don't think that's the same thing. I'm talking about the CI failure:
|
Woops, commented without looking :) I will investigate that. |
@danicheg Sounds good, that patch looks good to me too. |
Unfortunately, the error on JS preserves. It seems some changes in |
Yeah, I worked on it a bit but confounded at the moment, I'll try again later. @danicheg if you have bandwidth to bisect CE3 to figure out what caused this here that would be ✨ |
I bisected down to typelevel/cats-effect#2411 about cancellation, which seems plausible since the error is |
@armanbilge That PR actually does quite a bit. Tldr there was a bug in |
@djspiewak that was my first instinct to bisect further, but that PR is a single commit. |
Since this is JS, is it at all possible that you were somehow relying on the fact that cancelation did not shift? Like, you could call |
I must have? Certainly not intentionally, but seems plausible. I need to refresh myself with this code. |
@danicheg I have another patch for you. diff --git a/io/js/src/main/scala/fs2/io/ioplatform.scala b/io/js/src/main/scala/fs2/io/ioplatform.scala
index 57b2df3f..9dab4d6a 100644
--- a/io/js/src/main/scala/fs2/io/ioplatform.scala
+++ b/io/js/src/main/scala/fs2/io/ioplatform.scala
@@ -209,6 +209,7 @@ private[fs2] trait ioplatform {
new streamMod.Duplex(
streamMod
.DuplexOptions()
+ .setAutoDestroy(false)
.setRead { (duplex, _) =>
val readable = duplex.asInstanceOf[streamMod.Readable]
dispatcher.unsafeRunAndForget( No idea why the CE3 change exposed this. |
@armanbilge Thanks! It seems failed test is passing well locally. |
This replaces custom deterministic runtime and uses new
TestControl
fromcats-effect
in tests.@SystemFw your thoughts on this would be so much appreciated.