From 39ce05de18ff98426ea51c9b0003a6d52f06f016 Mon Sep 17 00:00:00 2001 From: Ronald Landheer-Cieslak Date: Sun, 7 Oct 2007 22:55:33 -0400 Subject: [PATCH] Test that Google will have closed the connection and that that throws an exception Also remove the output from Google --- tests/lib/Spin/Connector.cpp | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/tests/lib/Spin/Connector.cpp b/tests/lib/Spin/Connector.cpp index 2cf4b49..166986f 100755 --- a/tests/lib/Spin/Connector.cpp +++ b/tests/lib/Spin/Connector.cpp @@ -35,7 +35,8 @@ namespace Tests boost::tie(byte_count, reason) = connection.read(buffer); CPPUNIT_ASSERT(reason & ::Spin::Connection::should_retry__); buffer.resize(byte_count); - std::cout << std::endl << std::string(buffer.begin(), buffer.end()) << std::endl; + // when we get here, Google will have closed the connection + CPPUNIT_ASSERT_THROW(connection.read(buffer), std::runtime_error); } void Connector::tryCreateHTTPSConnectionToGoogle() @@ -51,7 +52,8 @@ namespace Tests boost::tie(byte_count, reason) = connection.read(buffer); CPPUNIT_ASSERT(reason & ::Spin::Connection::should_retry__); buffer.resize(byte_count); - std::cout << std::endl << std::string(buffer.begin(), buffer.end()) << std::endl; + // when we get here, Google will have closed the connection + CPPUNIT_ASSERT_THROW(connection.read(buffer), std::runtime_error); } } } -- 2.11.4.GIT