Fix a bug in TPipedTransport that broke pipelining.
Previously, TPipedTransport wrote it's full buffer to the "pipe" and
fully reset its buffer on a readEnd. This assumed that the buffer was
fully read at that point. This is not the case if requests are pipelined.
This change makes it only pipe out the portion that has been read and
copy the unread portion to the beginning of the buffer.
Also add a test that verifies the new functionality.
git-svn-id: https://svn.apache.org/repos/asf/incubator/thrift/trunk@665646 13f79535-47bb-0310-9956-ffa450edef68
diff --git a/test/Makefile.am b/test/Makefile.am
index 5490de8..f2ff45f 100644
--- a/test/Makefile.am
+++ b/test/Makefile.am
@@ -28,6 +28,7 @@
check_PROGRAMS = \
TFDTransportTest \
+ TPipedTransportTest \
DebugProtoTest \
JSONProtoTest \
OptionalRequiredTest \
@@ -52,6 +53,16 @@
TFDTransportTest_LDADD = \
$(top_srcdir)/lib/cpp/libthrift.la
+
+#
+# TPipedTransportTest
+#
+TPipedTransportTest_SOURCES = \
+ TPipedTransportTest.cpp
+
+TPipedTransportTest_LDADD = \
+ $(top_srcdir)/lib/cpp/libthrift.la
+
#
# DebugProtoTest
#