From 419f903ff44a22debba43976baae1e86c1e5d871 Mon Sep 17 00:00:00 2001 From: jsdelfino Date: Mon, 16 Jul 2012 06:47:59 +0000 Subject: Add a timeout property to the CURL HTTP clients. git-svn-id: http://svn.us.apache.org/repos/asf/tuscany@1361916 13f79535-47bb-0310-9956-ffa450edef68 --- sca-cpp/trunk/components/http/client-test.cpp | 14 +++++++------- 1 file changed, 7 insertions(+), 7 deletions(-) (limited to 'sca-cpp/trunk/components/http/client-test.cpp') diff --git a/sca-cpp/trunk/components/http/client-test.cpp b/sca-cpp/trunk/components/http/client-test.cpp index c040ed39df..bb1918f1f8 100644 --- a/sca-cpp/trunk/components/http/client-test.cpp +++ b/sca-cpp/trunk/components/http/client-test.cpp @@ -42,7 +42,7 @@ const string putURI("http://localhost:8090/httpput"); const string deleteURI("http://localhost:8090/httpdelete"); bool testGet() { - http::CURLSession cs("", "", "", ""); + http::CURLSession cs("", "", "", "", 0); const failable val = http::get(getURI, cs); assert(hasContent(val)); @@ -50,8 +50,8 @@ bool testGet() { } struct getLoop { - http::CURLSession cs; - getLoop(http::CURLSession cs) : cs(cs) { + http::CURLSession& cs; + getLoop(http::CURLSession& cs) : cs(cs) { } const bool operator()() const { const failable val = http::get(getURI, cs); @@ -61,7 +61,7 @@ struct getLoop { }; bool testGetPerf() { - http::CURLSession cs("", "", "", ""); + http::CURLSession cs("", "", "", "", 0); const lambda gl = getLoop(cs); cout << "HTTP get test " << time(gl, 5, 200) << " ms" << endl; @@ -70,7 +70,7 @@ bool testGetPerf() { } bool testPost() { - http::CURLSession cs("", "", "", ""); + http::CURLSession cs("", "", "", "", 0); const failable val = http::get(postURI, cs); assert(hasContent(val)); @@ -78,7 +78,7 @@ bool testPost() { } bool testPut() { - http::CURLSession cs("", "", "", ""); + http::CURLSession cs("", "", "", "", 0); const failable val = http::get(putURI, cs); assert(hasContent(val)); @@ -86,7 +86,7 @@ bool testPut() { } bool testDelete() { - http::CURLSession cs("", "", "", ""); + http::CURLSession cs("", "", "", "", 0); const failable val = http::get(deleteURI, cs); assert(hasContent(val)); -- cgit v1.2.3