X Tutup
Skip to content

Fix execution of copy file/archive command skips 0xFF bytes#501

Merged
marcuslinke merged 3 commits intodocker-java:masterfrom
tejksat:fixNettyResponseStreamSkipsFFBytes
Mar 29, 2016
Merged

Fix execution of copy file/archive command skips 0xFF bytes#501
marcuslinke merged 3 commits intodocker-java:masterfrom
tejksat:fixNettyResponseStreamSkipsFFBytes

Conversation

@tejksat
Copy link
Copy Markdown
Contributor

@tejksat tejksat commented Mar 11, 2016

I evaded from writing an integration test and just checked that no bytes from 0 to 255 are missed when using HttpResponseStreamHandler. Added Mockito as a test dependency for easy mocking ChannelHandlerContext.


This change is Review on Reviewable

@codecov-io
Copy link
Copy Markdown

Current coverage is 23.50%

Merging #501 into master will increase coverage by +0.58% as of ee71263

@@            master   #501   diff @@
=====================================
  Files          291    291       
  Stmts         6042   6042       
  Branches       527    527       
  Methods          0      0       
=====================================
+ Hit           1385   1420    +35
- Partial         83     85     +2
+ Missed        4574   4537    -37

Review entire Coverage Diff as of ee71263

Powered by Codecov. Updated on successful CI builds.

streamHandler.channelRead0(ctx, buffer);
streamHandler.channelReadComplete(ctx);

Assert.assertTrue(IOUtils.contentEquals(callback.getInputStream(), new ByteBufInputStream(buffer)));
Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

please use static import

@KostyaSha
Copy link
Copy Markdown
Member

@marcuslinke ?

@KostyaSha
Copy link
Copy Markdown
Member

I think real integration test is also required.

@KostyaSha
Copy link
Copy Markdown
Member

@tejksat please point "~/.docker-java.properties" (example could be found in resources) to some docker daemon and try implement integration test. Example could be found for any existing *Cmd*Test.

@tejksat
Copy link
Copy Markdown
Contributor Author

tejksat commented Mar 11, 2016

@KostyaSha ok, I'll check it a bit later.

@tejksat
Copy link
Copy Markdown
Contributor Author

tejksat commented Mar 20, 2016

@KostyaSha done. Please, take a look.

@KostyaSha
Copy link
Copy Markdown
Member

Cool, thanks. Would like @marcuslinke to look at.

@KostyaSha
Copy link
Copy Markdown
Member

@marcuslinke ping

@marcuslinke
Copy link
Copy Markdown
Contributor

Finally back in town hopefully I'm able to merge this evening.

@marcuslinke marcuslinke merged commit 2f62af8 into docker-java:master Mar 29, 2016
@marcuslinke
Copy link
Copy Markdown
Contributor

I will release 3.0.0-RC4 including this fix soon.

@marcuslinke
Copy link
Copy Markdown
Contributor

@tejksat Thanks for contributing!

@KostyaSha KostyaSha added this to the 3.0.0-RC4 milestone Mar 29, 2016
@marcuslinke marcuslinke changed the title Fix for #496 Fix execution of copy file/archive command skips 0xFF bytes Mar 29, 2016
@tejksat tejksat deleted the fixNettyResponseStreamSkipsFFBytes branch March 31, 2016 11:25
@tejksat
Copy link
Copy Markdown
Contributor Author

tejksat commented Mar 31, 2016

Nice, thank you!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants

X Tutup