aboutsummaryrefslogtreecommitdiffhomepage
path: root/test/cpp/end2end/end2end_test.cc
diff options
context:
space:
mode:
authorGravatar Craig Tiller <ctiller@google.com>2017-01-20 15:42:47 -0800
committerGravatar Craig Tiller <ctiller@google.com>2017-01-20 15:42:47 -0800
commitda9de8988b343a6c87a9c3ba6b4594020943b0a7 (patch)
treeeee5260113f8aef5919422558900f582753a464d /test/cpp/end2end/end2end_test.cc
parent1d77059e4b1ec17c704acfc876e321cc33bff99d (diff)
parent4a4a3a446871da594ef4662751e707789f2829c2 (diff)
Merge github.com:grpc/grpc into maxmsgsz
Diffstat (limited to 'test/cpp/end2end/end2end_test.cc')
-rw-r--r--test/cpp/end2end/end2end_test.cc21
1 files changed, 16 insertions, 5 deletions
diff --git a/test/cpp/end2end/end2end_test.cc b/test/cpp/end2end/end2end_test.cc
index 1a1a94e87c..d2c7edc64b 100644
--- a/test/cpp/end2end/end2end_test.cc
+++ b/test/cpp/end2end/end2end_test.cc
@@ -209,10 +209,7 @@ class TestScenario {
public:
TestScenario(bool proxy, const grpc::string& creds_type)
: use_proxy(proxy), credentials_type(creds_type) {}
- void Log() const {
- gpr_log(GPR_INFO, "Scenario: proxy %d, credentials %s", use_proxy,
- credentials_type.c_str());
- }
+ void Log() const;
bool use_proxy;
// Although the below grpc::string is logically const, we can't declare
// them const because of a limitation in the way old compilers (e.g., gcc-4.4)
@@ -220,6 +217,19 @@ class TestScenario {
grpc::string credentials_type;
};
+static std::ostream& operator<<(std::ostream& out,
+ const TestScenario& scenario) {
+ return out << "TestScenario{use_proxy="
+ << (scenario.use_proxy ? "true" : "false") << ", credentials='"
+ << scenario.credentials_type << "'}";
+}
+
+void TestScenario::Log() const {
+ std::ostringstream out;
+ out << *this;
+ gpr_log(GPR_DEBUG, "%s", out.str().c_str());
+}
+
class End2endTest : public ::testing::TestWithParam<TestScenario> {
protected:
End2endTest()
@@ -636,7 +646,7 @@ TEST_P(End2endServerTryCancelTest, BidiStreamServerCancelAfter) {
TestBidiStreamServerCancel(CANCEL_AFTER_PROCESSING, 5);
}
-TEST_P(End2endTest, SimpleRpcWithCustomeUserAgentPrefix) {
+TEST_P(End2endTest, SimpleRpcWithCustomUserAgentPrefix) {
user_agent_prefix_ = "custom_prefix";
ResetStub();
EchoRequest request;
@@ -1293,6 +1303,7 @@ TEST_P(SecureEnd2endTest, BlockingAuthMetadataPluginAndProcessorFailure) {
EXPECT_FALSE(s.ok());
EXPECT_EQ(s.error_code(), StatusCode::UNAUTHENTICATED);
}
+
TEST_P(SecureEnd2endTest, SetPerCallCredentials) {
ResetStub();
EchoRequest request;