-
Notifications
You must be signed in to change notification settings - Fork 83
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
Flaky streaming test #460
Comments
This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. Thank you for your contributions. |
Still seeing this dev.profunktor.redis4cats.RedisStreamSpec:
==> X dev.profunktor.redis4cats.RedisStreamSpec.append/read to/from a stream 3.212s java.util.NoSuchElementException: null
at fs2.Stream$CompileOps.$anonfun$lastOrError$3(Stream.scala:4401)
at scala.Option.fold(Option.scala:251)
at fs2.Stream$CompileOps.$anonfun$lastOrError$2(Stream.scala:4401) |
I was playing around with this. Somehow, setting the read to If we use N messages instead of 1, and say Question: why is there a redis4cats/modules/streams/src/main/scala/dev/profunktor/redis4cats/streams/Fs2Streaming.scala Line 97 in 296b6fe
|
Fixes that require a sleep or so are really flaky, that's why this test is marked as such.
Does
I can't remember any details of the streaming module, it's been too long, but since you seem to have it fresh I'll counter-ask, why shouldn't there be a repeat there? :) |
Yes, it misses the final message. It's less of a "here's a fix" and more of a "here are some things I noticed about it". That being said, the current test essentially says "block forever", until the interrupt, so I am specificially lowering the sleep from "infinite"/ The reason I don't expect a repeat is that (I believe) |
No, it would not, but there could be something wrong related to the |
I think I figured it out: redis/lettuce#1593 The As for why (Edit) This is also why my initial impression of the redundancy of |
I don't think
That makes sense, you can see how transactions and pipelining work in this library. Instead of adding two underlying connections, what you need is to create two different instances of |
Yep, fully agree with you. I meant to say that my impression was wrong (and that |
Ah no problems, thanks for digging into it! I think what we can do immediately is to create a proper withRedisStream helper method for testing that returns two instances of That may already fix the test, but obviously your findings on the usage of |
Documentation for streams needs to be marked as experimental as well, and we could document that two streaming connections need to be created (one for read; one for write), similar to how transactions/pipelining work. |
I think I'll have time before the weekend, will take a look in the direction you suggested. |
https://github.com/profunktor/redis4cats/runs/1805553054?check_suite_focus=true
The text was updated successfully, but these errors were encountered: