You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@kyuubi.apache.org by ul...@apache.org on 2021/08/20 03:48:37 UTC

[incubator-kyuubi] branch master updated: [KYUUBI #967] [TEST] Add log if pod status is unexpected

This is an automated email from the ASF dual-hosted git repository.

ulyssesyou pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/incubator-kyuubi.git


The following commit(s) were added to refs/heads/master by this push:
     new 4912542  [KYUUBI #967] [TEST] Add log if pod status is unexpected
4912542 is described below

commit 4912542bdacc941dc1d72bcbeb6065d3d0b8d4ac
Author: ulysses-you <ul...@gmail.com>
AuthorDate: Fri Aug 20 11:47:39 2021 +0800

    [KYUUBI #967] [TEST] Add log if pod status is unexpected
    
    <!--
    Thanks for sending a pull request!
    
    Here are some tips for you:
      1. If this is your first time, please read our contributor guidelines: https://kyuubi.readthedocs.io/en/latest/community/contributions.html
      2. If the PR is related to an issue in https://github.com/apache/incubator-kyuubi/issues, add '[KYUUBI #XXXX]' in your PR title, e.g., '[KYUUBI #XXXX] Your PR title ...'.
      3. If the PR is unfinished, add '[WIP]' in your PR title, e.g., '[WIP][KYUUBI #XXXX] Your PR title ...'.
    -->
    
    ### _Why are the changes needed?_
    <!--
    Please clarify why the changes are needed. For instance,
      1. If you add a feature, you can talk about the use case of it.
      2. If you fix a bug, you can clarify why it is a bug.
    -->
    Help debug failed test.
    
    ### _How was this patch tested?_
    - [ ] Add some test cases that check the changes thoroughly including negative and positive cases if possible
    
    - [ ] Add screenshots for manual tests if appropriate
    
    - [x] [Run test](https://kyuubi.readthedocs.io/en/latest/develop_tools/testing.html#running-tests) locally before make a pull request
    
    Closes #967 from ulysses-you/k8s-log.
    
    Closes #967
    
    6dfa1567 [ulysses-you] Add log if pod status is unexpected
    
    Authored-by: ulysses-you <ul...@gmail.com>
    Signed-off-by: ulysses-you <ul...@gmail.com>
---
 .../apache/kyuubi/kubernetes/test/KubernetesJDBCTestsSuite.scala   | 7 ++++++-
 1 file changed, 6 insertions(+), 1 deletion(-)

diff --git a/kubernetes/integration-tests/src/test/scala/org/apache/kyuubi/kubernetes/test/KubernetesJDBCTestsSuite.scala b/kubernetes/integration-tests/src/test/scala/org/apache/kyuubi/kubernetes/test/KubernetesJDBCTestsSuite.scala
index bc8cf0c..bc827ae 100644
--- a/kubernetes/integration-tests/src/test/scala/org/apache/kyuubi/kubernetes/test/KubernetesJDBCTestsSuite.scala
+++ b/kubernetes/integration-tests/src/test/scala/org/apache/kyuubi/kubernetes/test/KubernetesJDBCTestsSuite.scala
@@ -33,8 +33,13 @@ class KubernetesJDBCTestsSuite extends JDBCTests with Logging {
     val kyuubiServer = kyuubiServers.get(0)
     // Kyuubi server state should be running since mvn compile is quite slowly..
     if (!"running".equalsIgnoreCase(kyuubiServer.getStatus.getPhase)) {
+      val log =
+        kubernetesclient
+          .pods()
+          .withName(kyuubiServer.getMetadata.getName)
+          .getLog
       throw new IllegalStateException(
-        s"Kyuubi server pod state error: ${kyuubiServer.getStatus.getPhase}")
+        s"Kyuubi server pod state error: ${kyuubiServer.getStatus.getPhase}, log:\n$log")
     }
     val kyuubiServerIp = MiniKube.getIp
     val kyuubiServerPort =