Use zero-filled payload for UNCOMPRESSED.

Previously we were using English text, but this just adds extra effort for all
the other languages that will need to implement servers. The integration test
case descriptions uses zero-filled bytes.
-------------
Created by MOE: http://code.google.com/p/moe-java
MOE_MIGRATED_REVID=78477356
This commit is contained in:
ejona 2014-10-24 17:20:06 -07:00 committed by Eric Anderson
parent 0304b3d6b2
commit 2dbae4d4f2
1 changed files with 1 additions and 3 deletions

View File

@ -28,8 +28,6 @@ import java.util.concurrent.TimeUnit;
* sent in response streams.
*/
public class TestServiceImpl implements TestServiceGrpc.TestService {
private static final String COMPRESSABLE_FILE =
"/com/google/net/stubby/testing/integration/testdata/compressable.txt";
private static final String UNCOMPRESSABLE_FILE =
"/com/google/net/stubby/testing/integration/testdata/uncompressable.bin";
private final Random random = new Random();
@ -43,7 +41,7 @@ public class TestServiceImpl implements TestServiceGrpc.TestService {
*/
public TestServiceImpl(ScheduledExecutorService executor) {
this.executor = executor;
this.compressableBuffer = createBufferFromFile(COMPRESSABLE_FILE);
this.compressableBuffer = ByteString.copyFrom(new byte[1024]);
this.uncompressableBuffer = createBufferFromFile(UNCOMPRESSABLE_FILE);
}