Fix execution of copy file/archive command skips 0xFF bytes by tejksat · Pull Request #501 · docker-java/docker-java

@tejksat

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

@tejksat

…entation of copy file/archive commands

@codecov-io

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.

KostyaSha

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

Assert.assertTrue(IOUtils.contentEquals(callback.getInputStream(), new ByteBufInputStream(buffer)));

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

@KostyaSha

I think real integration test is also required.

@KostyaSha

@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

@tejksat

@tejksat

@tejksat

@KostyaSha

@KostyaSha

@marcuslinke

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

@marcuslinke

I will release 3.0.0-RC4 including this fix soon.

@marcuslinke

@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