Repository: hadoop
Updated Branches:
  refs/heads/branch-2 cba4ed167 -> 02fcf622f


Addendum for HDFS-7748.


Project: http://git-wip-us.apache.org/repos/asf/hadoop/repo
Commit: http://git-wip-us.apache.org/repos/asf/hadoop/commit/02fcf622
Tree: http://git-wip-us.apache.org/repos/asf/hadoop/tree/02fcf622
Diff: http://git-wip-us.apache.org/repos/asf/hadoop/diff/02fcf622

Branch: refs/heads/branch-2
Commit: 02fcf622fb020b2a6152f1c36650f7789ee02e13
Parents: cba4ed1
Author: Haohui Mai <[email protected]>
Authored: Mon Mar 30 12:23:45 2015 -0700
Committer: Haohui Mai <[email protected]>
Committed: Mon Mar 30 13:11:24 2015 -0700

----------------------------------------------------------------------
 .../org/apache/hadoop/hdfs/TestDataTransferProtocol.java    | 9 ++++-----
 1 file changed, 4 insertions(+), 5 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/hadoop/blob/02fcf622/hadoop-hdfs-project/hadoop-hdfs/src/test/java/org/apache/hadoop/hdfs/TestDataTransferProtocol.java
----------------------------------------------------------------------
diff --git 
a/hadoop-hdfs-project/hadoop-hdfs/src/test/java/org/apache/hadoop/hdfs/TestDataTransferProtocol.java
 
b/hadoop-hdfs-project/hadoop-hdfs/src/test/java/org/apache/hadoop/hdfs/TestDataTransferProtocol.java
index 16889d5..c5d889c 100644
--- 
a/hadoop-hdfs-project/hadoop-hdfs/src/test/java/org/apache/hadoop/hdfs/TestDataTransferProtocol.java
+++ 
b/hadoop-hdfs-project/hadoop-hdfs/src/test/java/org/apache/hadoop/hdfs/TestDataTransferProtocol.java
@@ -33,7 +33,6 @@ import java.net.Socket;
 import java.nio.ByteBuffer;
 import java.util.Random;
 
-import com.sun.xml.internal.messaging.saaj.util.ByteOutputStream;
 import org.apache.commons.logging.Log;
 import org.apache.commons.logging.LogFactory;
 import org.apache.hadoop.conf.Configuration;
@@ -540,17 +539,17 @@ public class TestDataTransferProtocol {
                                            Status.CHECKSUM_OK))
         .build();
 
-    ByteOutputStream oldAckBytes = new ByteOutputStream();
+    ByteArrayOutputStream oldAckBytes = new ByteArrayOutputStream();
     proto.writeDelimitedTo(oldAckBytes);
     PipelineAck oldAck = new PipelineAck();
-    oldAck.readFields(new ByteArrayInputStream(oldAckBytes.getBytes()));
+    oldAck.readFields(new ByteArrayInputStream(oldAckBytes.toByteArray()));
     assertEquals(PipelineAck.combineHeader(PipelineAck.ECN.DISABLED, Status
         .CHECKSUM_OK), oldAck.getHeaderFlag(0));
 
     PipelineAck newAck = new PipelineAck();
-    ByteOutputStream newAckBytes = new ByteOutputStream();
+    ByteArrayOutputStream newAckBytes = new ByteArrayOutputStream();
     newProto.writeDelimitedTo(newAckBytes);
-    newAck.readFields(new ByteArrayInputStream(newAckBytes.getBytes()));
+    newAck.readFields(new ByteArrayInputStream(newAckBytes.toByteArray()));
     assertEquals(PipelineAck.combineHeader(PipelineAck.ECN.SUPPORTED, Status
         .CHECKSUM_OK), newAck.getHeaderFlag(0));
   }

Reply via email to