You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@kyuubi.apache.org by fe...@apache.org on 2022/12/09 10:41:28 UTC

[incubator-kyuubi] branch master updated: [KYUUBI #3871] Fix flaky test: JpsApplicationOperation with jstat

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

feiwang 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 8305d80a1 [KYUUBI #3871] Fix flaky test: JpsApplicationOperation with jstat
8305d80a1 is described below

commit 8305d80a1301c13cd5318ac8a99316545c8191f5
Author: wForget <64...@qq.com>
AuthorDate: Fri Dec 9 18:41:20 2022 +0800

    [KYUUBI #3871] Fix flaky test: JpsApplicationOperation with jstat
    
    ### _Why are the changes needed?_
    
    Fix flaky test: JpsApplicationOperation with jstat
    close #3871
    
    ### _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
    
    - [ ] [Run test](https://kyuubi.apache.org/docs/latest/develop_tools/testing.html#running-tests) locally before make a pull request
    
    Closes #3954 from wForget/KYUUBI-3871.
    
    Closes #3871
    
    80a88b7ee [wForget] [KYUUBI-3871] Fix flaky test: JpsApplicationOperation with jstat
    
    Authored-by: wForget <64...@qq.com>
    Signed-off-by: fwang12 <fw...@ebay.com>
---
 .../kyuubi/engine/JpsApplicationOperationSuite.scala | 20 ++++++++++++--------
 1 file changed, 12 insertions(+), 8 deletions(-)

diff --git a/kyuubi-server/src/test/scala/org/apache/kyuubi/engine/JpsApplicationOperationSuite.scala b/kyuubi-server/src/test/scala/org/apache/kyuubi/engine/JpsApplicationOperationSuite.scala
index 9724bb1cb..22e711963 100644
--- a/kyuubi-server/src/test/scala/org/apache/kyuubi/engine/JpsApplicationOperationSuite.scala
+++ b/kyuubi-server/src/test/scala/org/apache/kyuubi/engine/JpsApplicationOperationSuite.scala
@@ -52,17 +52,21 @@ class JpsApplicationOperationSuite extends KyuubiFunSuite {
       }
     }.start()
 
-    val desc1 = jps.getApplicationInfoByTag("sun.tools.jstat.Jstat")
-    assert(desc1.id != null)
-    assert(desc1.name != null)
-    assert(desc1.state == ApplicationState.RUNNING)
+    eventually(Timeout(10.seconds)) {
+      val desc1 = jps.getApplicationInfoByTag("sun.tools.jstat.Jstat")
+      assert(desc1.id != null)
+      assert(desc1.name != null)
+      assert(desc1.state == ApplicationState.RUNNING)
+    }
 
     jps.killApplicationByTag("sun.tools.jstat.Jstat")
 
-    val desc2 = jps.getApplicationInfoByTag("sun.tools.jstat.Jstat")
-    assert(desc2.id == null)
-    assert(desc2.name == null)
-    assert(desc2.state == ApplicationState.NOT_FOUND)
+    eventually(Timeout(10.seconds)) {
+      val desc2 = jps.getApplicationInfoByTag("sun.tools.jstat.Jstat")
+      assert(desc2.id == null)
+      assert(desc2.name == null)
+      assert(desc2.state == ApplicationState.NOT_FOUND)
+    }
   }
 
   test("JpsApplicationOperation with spark local mode") {