summaryrefslogtreecommitdiffstats
path: root/fbench/src/test
diff options
context:
space:
mode:
authorHåvard Pettersen <havardpe@oath.com>2018-10-12 10:16:47 +0000
committerHåvard Pettersen <havardpe@oath.com>2018-10-12 10:16:47 +0000
commitc3365fadfb772fe69f2edc16a7ad3cfe8e5840b3 (patch)
tree57d8af5b15d54eb8b6c734e1077f22483a952c79 /fbench/src/test
parent327998b24d5756cd35dd093aa3747942ba3379de (diff)
use crypto engine and sync crypto socket in http client
Diffstat (limited to 'fbench/src/test')
-rw-r--r--fbench/src/test/httpclient.cpp7
-rw-r--r--fbench/src/test/httpclient_splitstring.cpp6
2 files changed, 9 insertions, 4 deletions
diff --git a/fbench/src/test/httpclient.cpp b/fbench/src/test/httpclient.cpp
index 4201da68b97..0d350c393c1 100644
--- a/fbench/src/test/httpclient.cpp
+++ b/fbench/src/test/httpclient.cpp
@@ -1,4 +1,6 @@
// Copyright 2017 Yahoo Holdings. Licensed under the terms of the Apache 2.0 license. See LICENSE in the project root.
+
+#include <vespa/vespalib/net/crypto_engine.h>
#include <httpclient/httpclient.h>
#include <iostream>
#include <thread>
@@ -11,13 +13,14 @@ main(int argc, char **argv)
return 1;
}
+ auto engine = std::make_shared<vespalib::NullCryptoEngine>();
HTTPClient *client;
ssize_t len;
if(argc == 4) {
- client = new HTTPClient(argv[1], atoi(argv[2]), false, true);
+ client = new HTTPClient(engine, argv[1], atoi(argv[2]), false, true);
} else {
- client = new HTTPClient(argv[1], atoi(argv[2]), true, true);
+ client = new HTTPClient(engine, argv[1], atoi(argv[2]), true, true);
}
std::ostream * output = & std::cout;
diff --git a/fbench/src/test/httpclient_splitstring.cpp b/fbench/src/test/httpclient_splitstring.cpp
index d766b0f8f4b..4f3e0027db0 100644
--- a/fbench/src/test/httpclient_splitstring.cpp
+++ b/fbench/src/test/httpclient_splitstring.cpp
@@ -1,13 +1,15 @@
// Copyright 2017 Yahoo Holdings. Licensed under the terms of the Apache 2.0 license. See LICENSE in the project root.
+#include <vespa/vespalib/net/crypto_engine.h>
#include <httpclient/httpclient.h>
#include <cstring>
class DebugHTTPClient : public HTTPClient
{
public:
- DebugHTTPClient(const char* server, int port, bool keepAlive)
- : HTTPClient(server, port, keepAlive, true) {}
+ DebugHTTPClient()
+ : HTTPClient(std::make_shared<vespalib::NullCryptoEngine>(),
+ "localhost", 80, true, true) {}
static void SplitLineTest(const char *input);
static void DebugSplitLine();