summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorjfarrell <jfarrell@apache.org>2015-08-25 14:59:40 -0400
committerjfarrell <jfarrell@apache.org>2015-08-25 14:59:40 -0400
commite2e5e22c1183a81fc101e4f2e6c13b7ebd41bc8e (patch)
treee7e54a60b965390a019c48455c381811055e6229
parent400d02c75fe0eba95068217dec3af1f033c4bce3 (diff)
downloadthrift-e2e5e22c1183a81fc101e4f2e6c13b7ebd41bc8e.tar.gz
THRIFT-3308: Fix broken test cases for 0.9.3 release candidate
client: build Patch: jfarrell Fix broken test cases, make check now passes with all files in dist
-rw-r--r--.gitignore1
-rw-r--r--lib/cpp/src/thrift/transport/TPipe.cpp4
-rw-r--r--lib/cpp/src/thrift/transport/TPipe.h4
-rwxr-xr-xlib/cpp/test/Makefile.am5
-rw-r--r--lib/cpp/test/TPipeInterruptTest.cpp5
-rw-r--r--lib/cpp/test/TPipedTransportTest.cpp2
6 files changed, 14 insertions, 7 deletions
diff --git a/.gitignore b/.gitignore
index ac6253a97..421946841 100644
--- a/.gitignore
+++ b/.gitignore
@@ -127,6 +127,7 @@ test-driver
/lib/c_glib/test/testapplicationexception
/lib/c_glib/test/testbinaryprotocol
/lib/c_glib/test/testbufferedtransport
+/lib/c_glib/test/testcontainertest
/lib/c_glib/test/testdebugproto
/lib/c_glib/test/testframedtransport
/lib/c_glib/test/testmemorybuffer
diff --git a/lib/cpp/src/thrift/transport/TPipe.cpp b/lib/cpp/src/thrift/transport/TPipe.cpp
index cd114c2b1..b1e1b7275 100644
--- a/lib/cpp/src/thrift/transport/TPipe.cpp
+++ b/lib/cpp/src/thrift/transport/TPipe.cpp
@@ -385,11 +385,11 @@ HANDLE TPipe::getNativeWaitHandle() {
return INVALID_HANDLE_VALUE;
}
-long TPipe::getConnectTimeout() {
+long TPipe::getConnTimeout() {
return TimeoutSeconds_;
}
-void TPipe::setConnectTimeout(long seconds) {
+void TPipe::setConnTimeout(long seconds) {
TimeoutSeconds_ = seconds;
}
diff --git a/lib/cpp/src/thrift/transport/TPipe.h b/lib/cpp/src/thrift/transport/TPipe.h
index 83ed9c717..fdb17ee22 100644
--- a/lib/cpp/src/thrift/transport/TPipe.h
+++ b/lib/cpp/src/thrift/transport/TPipe.h
@@ -87,8 +87,8 @@ public:
void setPipeHandle(HANDLE pipehandle);
HANDLE getWrtPipeHandle();
void setWrtPipeHandle(HANDLE pipehandle);
- long getConnectTimeout();
- void setConnectTimeout(long seconds);
+ long getConnTimeout();
+ void setConnTimeout(long seconds);
// this function is intended to be used in generic / template situations,
// so its name needs to be the same as TPipeServer's
diff --git a/lib/cpp/test/Makefile.am b/lib/cpp/test/Makefile.am
index 435f2b58a..b19f7914e 100755
--- a/lib/cpp/test/Makefile.am
+++ b/lib/cpp/test/Makefile.am
@@ -209,8 +209,11 @@ TPipedTransportTest_SOURCES = \
TPipeInterruptTest.cpp
TPipedTransportTest_LDADD = \
+ libtestgencpp.la \
$(top_builddir)/lib/cpp/libthrift.la \
- $(BOOST_TEST_LDADD)
+ $(BOOST_TEST_LDADD) \
+ $(BOOST_SYSTEM_LDADD) \
+ $(BOOST_THREAD_LDADD)
#
# AllProtocolsTest
diff --git a/lib/cpp/test/TPipeInterruptTest.cpp b/lib/cpp/test/TPipeInterruptTest.cpp
index b0e246db1..e2f248967 100644
--- a/lib/cpp/test/TPipeInterruptTest.cpp
+++ b/lib/cpp/test/TPipeInterruptTest.cpp
@@ -17,6 +17,8 @@
* under the License.
*/
+#ifdef _WIN32
+
#include <boost/test/test_tools.hpp>
#include <boost/test/unit_test_suite.hpp>
@@ -74,7 +76,7 @@ BOOST_AUTO_TEST_CASE(stress_pipe_accept_interruption) {
for (;;)
{
TPipe client("TPipeInterruptTest");
- client.setConnectTimeout(1);
+ client.setConnTimeout(1);
client.open();
}
} catch (...) { /*just testing for crashes*/ }
@@ -84,3 +86,4 @@ BOOST_AUTO_TEST_CASE(stress_pipe_accept_interruption) {
}
BOOST_AUTO_TEST_SUITE_END()
+#endif
diff --git a/lib/cpp/test/TPipedTransportTest.cpp b/lib/cpp/test/TPipedTransportTest.cpp
index a2ec81e42..3221fb940 100644
--- a/lib/cpp/test/TPipedTransportTest.cpp
+++ b/lib/cpp/test/TPipedTransportTest.cpp
@@ -28,7 +28,7 @@ using apache::thrift::transport::TTransportException;
using apache::thrift::transport::TPipedTransport;
using apache::thrift::transport::TMemoryBuffer;
-BOOST_AUTO_TEST_CASE(test_tpipedtransport_1) {
+BOOST_AUTO_TEST_CASE(test_read_write) {
boost::shared_ptr<TMemoryBuffer> underlying(new TMemoryBuffer);
boost::shared_ptr<TMemoryBuffer> pipe(new TMemoryBuffer);
boost::shared_ptr<TPipedTransport> trans(new TPipedTransport(underlying, pipe));