-
Couldn't load subscription status.
- Fork 1.4k
Add ZStream.fromFile #3697
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
Add ZStream.fromFile #3697
Conversation
dec0fa1 to
7321e27
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.
Looks good! Just few small suggestions.
| items <- fiber.join | ||
| } yield assert(items)(equalTo(c.toSeq.toList)) | ||
| }) | ||
| testM("fromFile") { |
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.
Don't think that these two tests are mutually exclusive :)
| } yield assert(items)(equalTo(c.toSeq.toList)) | ||
| }) | ||
| testM("fromFile") { | ||
| val data = List.fill(76)("a").mkString |
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 are are pulling the same data every time. Since we are dealing with mutable buffers, it makes the test less powerful.
Maybe data = (1 to 100).mkString ?
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.
Good point!
| }) | ||
| testM("fromFile") { | ||
| val data = List.fill(76)("a").mkString | ||
|
|
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.
Also would be great to have a negative test. E.g. reading from a missing file
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.
Did you mean to delete the fromQueue test? Other than that looks good.
7321e27 to
1fcd182
Compare
|
The fromQueue test somehow ended up in the platform-specific file, whereas it exists in the cross-platform tests :-) |
|
LGTM as well |
Refs #3646
Just the simple whole-file version currently.