Skip to content

Commit

Permalink
[KYUUBI #3871] Fix flaky test: JpsApplicationOperation with jstat
Browse files Browse the repository at this point in the history
### _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

80a88b7 [wForget] [KYUUBI-3871] Fix flaky test: JpsApplicationOperation with jstat

Authored-by: wForget <643348094@qq.com>
Signed-off-by: fwang12 <fwang12@ebay.com>
  • Loading branch information
wForget authored and turboFei committed Dec 9, 2022
1 parent e86df1a commit 8305d80
Showing 1 changed file with 12 additions and 8 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -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") {
Expand Down

0 comments on commit 8305d80

Please sign in to comment.