Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Conversation

@iravid
Copy link
Member

@iravid iravid commented May 25, 2020

Refs #3646

Just the simple whole-file version currently.

@iravid iravid force-pushed the feature/zstream-fromfile branch 3 times, most recently from dec0fa1 to 7321e27 Compare May 25, 2020 12:28
@iravid iravid requested a review from adamgfraser May 25, 2020 12:35
Copy link
Contributor

@simpadjo simpadjo left a 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") {
Copy link
Contributor

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
Copy link
Contributor

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 ?

Copy link
Member Author

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

Copy link
Contributor

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

adamgfraser
adamgfraser previously approved these changes May 25, 2020
Copy link
Contributor

@adamgfraser adamgfraser left a 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.

@iravid
Copy link
Member Author

iravid commented May 25, 2020

The fromQueue test somehow ended up in the platform-specific file, whereas it exists in the cross-platform tests :-)

@luis3m
Copy link
Contributor

luis3m commented May 25, 2020

LGTM as well

@iravid iravid merged commit 5ad0d68 into zio:master May 25, 2020
@mtjon mtjon mentioned this pull request Jun 21, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants