You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@impala.apache.org by ta...@apache.org on 2018/02/09 16:59:30 UTC

[2/6] impala git commit: IMPALA-6477: Fix flakiness with thrift-server-test

IMPALA-6477: Fix flakiness with thrift-server-test

THe ThriftKerberizedParamsTest.SslConnectivity backend test verifies
that when kerberos and TLS are switched on, we cannot perform a
negotiation with a non TLS enabled client.

The test works as expected, however, the error messages can be
different in some scenarios. This patch just updates the test to
expect a different error message that has the same effect.

This change also links KRB5_REALM_OVERRIDE back with the
rpc-mgr-test, as one test run showed a similar failure as
IMPALA-6268. It's possible that this is due to IMPALA-6448.

Change-Id: I6294447416ecccc864b842013487f4d93afadc6b
Reviewed-on: http://gerrit.cloudera.org:8080/9247
Reviewed-by: Alex Behm <al...@cloudera.com>
Tested-by: Impala Public Jenkins


Project: http://git-wip-us.apache.org/repos/asf/impala/repo
Commit: http://git-wip-us.apache.org/repos/asf/impala/commit/8abc166e
Tree: http://git-wip-us.apache.org/repos/asf/impala/tree/8abc166e
Diff: http://git-wip-us.apache.org/repos/asf/impala/diff/8abc166e

Branch: refs/heads/master
Commit: 8abc166e113a54e7921796fd1ddfebf6bfdc3982
Parents: 572af61
Author: Sailesh Mukil <sa...@cloudera.com>
Authored: Wed Feb 7 13:26:05 2018 -0800
Committer: Impala Public Jenkins <im...@gerrit.cloudera.org>
Committed: Thu Feb 8 20:22:26 2018 +0000

----------------------------------------------------------------------
 be/src/rpc/CMakeLists.txt        |  1 +
 be/src/rpc/thrift-server-test.cc | 10 ++++++++--
 2 files changed, 9 insertions(+), 2 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/impala/blob/8abc166e/be/src/rpc/CMakeLists.txt
----------------------------------------------------------------------
diff --git a/be/src/rpc/CMakeLists.txt b/be/src/rpc/CMakeLists.txt
index e4d96e2..1c7adc6 100644
--- a/be/src/rpc/CMakeLists.txt
+++ b/be/src/rpc/CMakeLists.txt
@@ -50,6 +50,7 @@ ADD_BE_TEST(rpc-mgr-test)
 add_dependencies(rpc-mgr-test rpc_test_proto)
 target_link_libraries(rpc-mgr-test rpc_test_proto)
 target_link_libraries(rpc-mgr-test security-test-for-impala)
+target_link_libraries(rpc-mgr-test ${KRB5_REALM_OVERRIDE})
 
 ADD_BE_TEST(rpc-mgr-kerberized-test)
 add_dependencies(rpc-mgr-kerberized-test rpc_test_proto)

http://git-wip-us.apache.org/repos/asf/impala/blob/8abc166e/be/src/rpc/thrift-server-test.cc
----------------------------------------------------------------------
diff --git a/be/src/rpc/thrift-server-test.cc b/be/src/rpc/thrift-server-test.cc
index f1e0f4b..8bd7275 100644
--- a/be/src/rpc/thrift-server-test.cc
+++ b/be/src/rpc/thrift-server-test.cc
@@ -172,8 +172,14 @@ TEST_P(ThriftKerberizedParamsTest, SslConnectivity) {
     // When Kerberos is ON, the SASL negotiation happens inside Open(). We expect that to
     // fail beacuse the server expects the client to negotiate over an encrypted
     // connection.
-    EXPECT_STR_CONTAINS(non_ssl_client.Open().GetDetail(),
-        "No more data to read");
+    // The expected error message can either state "No more data to read" or
+    // "Couldn't open transport".
+    const std::string& status = non_ssl_client.Open().GetDetail();
+    size_t found_substr = status.find("No more data to read");
+    if (found_substr == string::npos) {
+      EXPECT_STR_CONTAINS(non_ssl_client.Open().GetDetail(),
+          "Couldn't open transport");
+    }
   }
 
 }