Skip to content
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

Re-enable or remove "decode too long" and "decode too short" streaming exception tests #87

Open
mgsloan opened this issue Nov 16, 2016 · 0 comments

Comments

@mgsloan
Copy link
Owner

mgsloan commented Nov 16, 2016

Due to commercialhaskell/stack#2604 (comment), I took a look at the decodeTooLong and decodeTooShort tests. Looks to me like the issue is that the test assumes Int is 8 bytes, but on ARM it's likely only 4.

I also noticed that these two tests are out of date - they do not include poking the messageMagic. The test is expecting any PeekException, including "Wrong message magic, ...".

I've pushed a branch, https://github.com/fpco/store/tree/alternative-streaming-test-encode, with an alternative approach for generating the too-short message and too-long message. Surprisingly, neither causes an exception to be thrown! Is this a bug?

For now, disabling the tests as all they're testing is the magic number detection.

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

No branches or pull requests

1 participant