|
@@ -45,10 +45,12 @@ protected:
|
|
}
|
|
}
|
|
static QCoreApplication m_app;
|
|
static QCoreApplication m_app;
|
|
static int m_argc;
|
|
static int m_argc;
|
|
|
|
+ static QUrl m_echoServerAddress;
|
|
};
|
|
};
|
|
|
|
|
|
int ClientTest::m_argc(0);
|
|
int ClientTest::m_argc(0);
|
|
QCoreApplication ClientTest::m_app(m_argc, nullptr);
|
|
QCoreApplication ClientTest::m_app(m_argc, nullptr);
|
|
|
|
+QUrl ClientTest::m_echoServerAddress("http://localhost:50051", QUrl::StrictMode);
|
|
|
|
|
|
TEST_F(ClientTest, CheckMethodsGeneration)
|
|
TEST_F(ClientTest, CheckMethodsGeneration)
|
|
{
|
|
{
|
|
@@ -65,7 +67,7 @@ TEST_F(ClientTest, CheckMethodsGeneration)
|
|
TEST_F(ClientTest, StringEchoTest)
|
|
TEST_F(ClientTest, StringEchoTest)
|
|
{
|
|
{
|
|
TestServiceClient testClient;
|
|
TestServiceClient testClient;
|
|
- testClient.attachChannel(std::make_shared<Http2Channel>("localhost", 50051, InsecureCredentials()));
|
|
|
|
|
|
+ testClient.attachChannel(std::make_shared<Http2Channel>(m_echoServerAddress, InsecureCredentials()));
|
|
SimpleStringMessage request;
|
|
SimpleStringMessage request;
|
|
QPointer<SimpleStringMessage> result(new SimpleStringMessage);
|
|
QPointer<SimpleStringMessage> result(new SimpleStringMessage);
|
|
request.setTestFieldString("Hello beach!");
|
|
request.setTestFieldString("Hello beach!");
|
|
@@ -77,7 +79,7 @@ TEST_F(ClientTest, StringEchoTest)
|
|
TEST_F(ClientTest, StringEchoAsyncTest)
|
|
TEST_F(ClientTest, StringEchoAsyncTest)
|
|
{
|
|
{
|
|
TestServiceClient testClient;
|
|
TestServiceClient testClient;
|
|
- testClient.attachChannel(std::make_shared<Http2Channel>("localhost", 50051, InsecureCredentials()));
|
|
|
|
|
|
+ testClient.attachChannel(std::make_shared<Http2Channel>(m_echoServerAddress, InsecureCredentials()));
|
|
SimpleStringMessage request;
|
|
SimpleStringMessage request;
|
|
SimpleStringMessage result;
|
|
SimpleStringMessage result;
|
|
request.setTestFieldString("Hello beach!");
|
|
request.setTestFieldString("Hello beach!");
|
|
@@ -98,7 +100,7 @@ TEST_F(ClientTest, StringEchoAsyncTest)
|
|
TEST_F(ClientTest, StringEchoAsync2Test)
|
|
TEST_F(ClientTest, StringEchoAsync2Test)
|
|
{
|
|
{
|
|
TestServiceClient testClient;
|
|
TestServiceClient testClient;
|
|
- testClient.attachChannel(std::make_shared<Http2Channel>("localhost", 50051, InsecureCredentials()));
|
|
|
|
|
|
+ testClient.attachChannel(std::make_shared<Http2Channel>(m_echoServerAddress, InsecureCredentials()));
|
|
SimpleStringMessage result;
|
|
SimpleStringMessage result;
|
|
SimpleStringMessage request;
|
|
SimpleStringMessage request;
|
|
request.setTestFieldString("Hello beach!");
|
|
request.setTestFieldString("Hello beach!");
|
|
@@ -117,7 +119,7 @@ TEST_F(ClientTest, StringEchoAsync2Test)
|
|
TEST_F(ClientTest, StringEchoAsyncAbortTest)
|
|
TEST_F(ClientTest, StringEchoAsyncAbortTest)
|
|
{
|
|
{
|
|
TestServiceClient testClient;
|
|
TestServiceClient testClient;
|
|
- testClient.attachChannel(std::make_shared<Http2Channel>("localhost", 50051, InsecureCredentials()));
|
|
|
|
|
|
+ testClient.attachChannel(std::make_shared<Http2Channel>(m_echoServerAddress, InsecureCredentials()));
|
|
SimpleStringMessage result;
|
|
SimpleStringMessage result;
|
|
SimpleStringMessage request;
|
|
SimpleStringMessage request;
|
|
request.setTestFieldString("sleep");
|
|
request.setTestFieldString("sleep");
|
|
@@ -170,7 +172,7 @@ TEST_F(ClientTest, StringEchoAsyncAbortTest)
|
|
TEST_F(ClientTest, StringEchoStreamTest)
|
|
TEST_F(ClientTest, StringEchoStreamTest)
|
|
{
|
|
{
|
|
TestServiceClient testClient;
|
|
TestServiceClient testClient;
|
|
- testClient.attachChannel(std::make_shared<Http2Channel>("localhost", 50051, InsecureCredentials()));
|
|
|
|
|
|
+ testClient.attachChannel(std::make_shared<Http2Channel>(m_echoServerAddress, InsecureCredentials()));
|
|
SimpleStringMessage result;
|
|
SimpleStringMessage result;
|
|
SimpleStringMessage request;
|
|
SimpleStringMessage request;
|
|
request.setTestFieldString("Stream");
|
|
request.setTestFieldString("Stream");
|
|
@@ -201,7 +203,7 @@ TEST_F(ClientTest, StringEchoStreamTest)
|
|
TEST_F(ClientTest, StringEchoStreamTestRetUpdates)
|
|
TEST_F(ClientTest, StringEchoStreamTestRetUpdates)
|
|
{
|
|
{
|
|
TestServiceClient testClient;
|
|
TestServiceClient testClient;
|
|
- testClient.attachChannel(std::make_shared<Http2Channel>("localhost", 50051, InsecureCredentials()));
|
|
|
|
|
|
+ testClient.attachChannel(std::make_shared<Http2Channel>(m_echoServerAddress, InsecureCredentials()));
|
|
SimpleStringMessage request;
|
|
SimpleStringMessage request;
|
|
QPointer<SimpleStringMessage> result(new SimpleStringMessage);
|
|
QPointer<SimpleStringMessage> result(new SimpleStringMessage);
|
|
|
|
|
|
@@ -228,7 +230,7 @@ TEST_F(ClientTest, StringEchoStreamTestRetUpdates)
|
|
TEST_F(ClientTest, HugeBlobEchoStreamTest)
|
|
TEST_F(ClientTest, HugeBlobEchoStreamTest)
|
|
{
|
|
{
|
|
TestServiceClient testClient;
|
|
TestServiceClient testClient;
|
|
- testClient.attachChannel(std::make_shared<Http2Channel>("localhost", 50051, InsecureCredentials()));
|
|
|
|
|
|
+ testClient.attachChannel(std::make_shared<Http2Channel>(m_echoServerAddress, InsecureCredentials()));
|
|
BlobMessage result;
|
|
BlobMessage result;
|
|
BlobMessage request;
|
|
BlobMessage request;
|
|
QFile testFile("testfile");
|
|
QFile testFile("testfile");
|