`InputStream` supporting `mark` / `reset` should not be manipulated by assertions
See original GitHub issueRelated to https://github.com/assertj/assertj-core/issues/2490#issuecomment-1035488261, the assertions of AbstractInputStreamAssert
could avoid manipulating the stream position when the InputStream
implementation supports mark
/ reset
operations, tested by markSupported
.
Issue Analytics
- State:
- Created a year ago
- Comments:9 (9 by maintainers)
Top Results From Across the Web
InputStream supporting mark / reset should not be ... - GitHub
About the code snippet, I'd say the mark/reset pair should be pushed down to InputStreams , being an implementation detail of the assertions, ......
Read more >BufferedInputStream mark/reset issue - java - Stack Overflow
The problem here is that you have already read two or three bytes from the input stream with the BufferedInputStream .
Read more >mark/reset method not supported for InputStream?
IOException:mark/reset not supported" and I used the markSupported() method to check and it verifies that it is not supported.
Read more >4. Streams - Java Network Programming, 3rd Edition [Book]
BufferedInputStream does not declare any new methods of its own. It only overrides methods from InputStream . It does support marking and resetting....
Read more >Karate | Test Automation Made Simple.
Karate is the only open-source tool to combine API test-automation, mocks, performance-testing and even UI automation into a single, unified framework.
Read more >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
@jessicant yes, I had roughly this in mind. Maybe an additional parameter is needed for the
readLimit
ofmark
, probably 1 is not enough in case of some assertions likehasContent
.@scordio Haha, no problem, Jessica and myself are still trying to get more experience before we take on harder issues.