summaryrefslogtreecommitdiffstats
path: root/sca-cpp/trunk/components/http/client-test.cpp
diff options
context:
space:
mode:
authorjsdelfino <jsdelfino@13f79535-47bb-0310-9956-ffa450edef68>2012-07-16 06:47:59 +0000
committerjsdelfino <jsdelfino@13f79535-47bb-0310-9956-ffa450edef68>2012-07-16 06:47:59 +0000
commit419f903ff44a22debba43976baae1e86c1e5d871 (patch)
tree8e715931d2f85c036a27f7de47c6e665ae7d8e80 /sca-cpp/trunk/components/http/client-test.cpp
parent11522a4b90a4056319cdbc204fffc63780cbfa51 (diff)
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
Diffstat (limited to 'sca-cpp/trunk/components/http/client-test.cpp')
-rw-r--r--sca-cpp/trunk/components/http/client-test.cpp14
1 files changed, 7 insertions, 7 deletions
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<value> 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<value> val = http::get(getURI, cs);
@@ -61,7 +61,7 @@ struct getLoop {
};
bool testGetPerf() {
- http::CURLSession cs("", "", "", "");
+ http::CURLSession cs("", "", "", "", 0);
const lambda<bool()> 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<value> 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<value> 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<value> val = http::get(deleteURI, cs);
assert(hasContent(val));