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/modules/http/curl-test.cpp | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) (limited to 'sca-cpp/trunk/modules/http/curl-test.cpp') diff --git a/sca-cpp/trunk/modules/http/curl-test.cpp b/sca-cpp/trunk/modules/http/curl-test.cpp index 2a1803b873..f0806ea577 100644 --- a/sca-cpp/trunk/modules/http/curl-test.cpp +++ b/sca-cpp/trunk/modules/http/curl-test.cpp @@ -40,7 +40,7 @@ ostream* curlWriter(const string& s, ostream* os) { } const bool testGet() { - CURLSession ch("", "", "", ""); + CURLSession ch("", "", "", "", 0); { ostringstream os; const failable > r = get(curlWriter, &os, testURI, ch); @@ -69,7 +69,7 @@ struct getLoop { }; const bool testGetPerf() { - CURLSession ch("", "", "", ""); + CURLSession ch("", "", "", "", 0); lambda gl = getLoop(ch); cout << "Static GET test " << time(gl, 5, 200) << " ms" << endl; return true; @@ -79,8 +79,9 @@ const bool testGetPerf() { } int main() { + tuscany::gc_scoped_pool p; tuscany::cout << "Testing..." << tuscany::endl; - tuscany::http::testURI = tuscany::string("http://") + tuscany::http::hostName() + ":8090"; + //tuscany::http::testURI = tuscany::string("http://") + tuscany::http::hostName() + ":8090"; tuscany::http::testGet(); tuscany::http::testGetPerf(); -- cgit v1.2.3