Skip to content

Commit

Permalink
Merge pull request grpc#1139 from vjpai/fix_tests_4_4
Browse files Browse the repository at this point in the history
Fix most c++ tests for gcc 4.4
  • Loading branch information
nicolasnoble committed Mar 26, 2015
2 parents 10dd2a1 + 6130809 commit a8c7c20
Show file tree
Hide file tree
Showing 3 changed files with 13 additions and 5 deletions.
10 changes: 7 additions & 3 deletions test/cpp/end2end/async_end2end_test.cc
Original file line number Diff line number Diff line change
Expand Up @@ -532,15 +532,19 @@ TEST_F(AsyncEnd2endTest, MetadataRpc) {
send_request.set_message("Hello");
std::pair<grpc::string, grpc::string> meta1("key1", "val1");
std::pair<grpc::string, grpc::string> meta2(
"key2-bin", {"\xc0\xc1\xc2\xc3\xc4\xc5\xc6\xc7\xc8\xc9\xca\xcb\xcc", 13});
"key2-bin",
grpc::string("\xc0\xc1\xc2\xc3\xc4\xc5\xc6\xc7\xc8\xc9\xca\xcb\xcc",
13));
std::pair<grpc::string, grpc::string> meta3("key3", "val3");
std::pair<grpc::string, grpc::string> meta6(
"key4-bin",
{"\x10\x11\x12\x13\x14\x15\x16\x17\x18\x19\x1a\x1b\x1c\x1d", 14});
grpc::string("\x10\x11\x12\x13\x14\x15\x16\x17\x18\x19\x1a\x1b\x1c\x1d",
14));
std::pair<grpc::string, grpc::string> meta5("key5", "val5");
std::pair<grpc::string, grpc::string> meta4(
"key6-bin",
{"\xe0\xe1\xe2\xe3\xe4\xe5\xe6\xe7\xe8\xe9\xea\xeb\xec\xed\xee", 15});
grpc::string("\xe0\xe1\xe2\xe3\xe4\xe5\xe6\xe7\xe8\xe9\xea\xeb\xec\xed\xee",
15));

cli_ctx.AddMetadata(meta1.first, meta1.second);
cli_ctx.AddMetadata(meta2.first, meta2.second);
Expand Down
7 changes: 5 additions & 2 deletions test/cpp/interop/server.cc
Original file line number Diff line number Diff line change
Expand Up @@ -213,8 +213,11 @@ void RunServer() {
builder.RegisterService(&service);
std::shared_ptr<ServerCredentials> creds = grpc::InsecureServerCredentials();
if (FLAGS_enable_ssl) {
SslServerCredentialsOptions ssl_opts = {
"", {{test_server1_key, test_server1_cert}}};
SslServerCredentialsOptions::PemKeyCertPair pkcp = {test_server1_key,
test_server1_cert};
SslServerCredentialsOptions ssl_opts;
ssl_opts.pem_root_certs = "";
ssl_opts.pem_key_cert_pairs.push_back(pkcp);
creds = grpc::SslServerCredentials(ssl_opts);
}
builder.AddListeningPort(server_address.str(), creds);
Expand Down
1 change: 1 addition & 0 deletions test/cpp/qps/timer.cc
Original file line number Diff line number Diff line change
Expand Up @@ -36,6 +36,7 @@
#include <sys/time.h>
#include <sys/resource.h>
#include <grpc/support/time.h>
#include <grpc++/config.h>

Timer::Timer() : start_(Sample()) {}

Expand Down

0 comments on commit a8c7c20

Please sign in to comment.