Skip to content

Commit

Permalink
[KYUUBI #5785] Fix flaky test - JpsApplicationOperation with spark lo…
Browse files Browse the repository at this point in the history
…cal mode

# 🔍 Description
## Issue References 🔗

This pull request fixes #2642

## Describe Your Solution 🔧

#2669 (comment)

```bash
jps -ml
```

```
99427 org.apache.spark.launcher.Main org.apache.spark.deploy.SparkSubmit --class org.apache.spark.sql.hive.thriftserver.SparkSQLCLIDriver --conf spark.abc=123
```

```
99416 org.apache.spark.deploy.SparkSubmit --conf spark.abc=123 --class org.apache.spark.sql.hive.thriftserver.SparkSQLCLIDriver spark-internal
```

## Types of changes 🔖

- [x] Bugfix (non-breaking change which fixes an issue)
- [ ] New feature (non-breaking change which adds functionality)
- [ ] Breaking change (fix or feature that would cause existing functionality to change)

## Test Plan 🧪

#### Behavior Without This Pull Request ⚰️
https://github.com/apache/kyuubi/actions/runs/6981210739/job/18997901268?pr=5773
```
- JpsApplicationOperation with spark local mode *** FAILED ***
  The code passed to eventually never returned normally. Attempted 41 times over 10.235822332 seconds. Last failure message: "23463" did not equal null. (JpsApplicationOperationSuite.scala:92)
```

#### Behavior With This Pull Request 🎉
GA

#### Related Unit Tests
JpsApplicationOperationSuite

"JpsApplicationOperation with spark local mode"

---

# Checklists
## 📝 Author Self Checklist

- [x] My code follows the [style guidelines](https://kyuubi.readthedocs.io/en/master/contributing/code/style.html) of this project
- [x] I have performed a self-review
- [ ] I have commented my code, particularly in hard-to-understand areas
- [x] I have made corresponding changes to the documentation
- [x] My changes generate no new warnings
- [ ] I have added tests that prove my fix is effective or that my feature works
- [ ] New and existing unit tests pass locally with my changes
- [x] This patch was not authored or co-authored using [Generative Tooling](https://www.apache.org/legal/generative-tooling.html)

## 📝 Committer Pre-Merge Checklist

- [ ] Pull request title is okay.
- [ ] No license issues.
- [ ] Milestone correctly set?
- [ ] Test coverage is ok
- [ ] Assignees are selected.
- [ ] Minimum number of approvals
- [ ] No changes are requested

**Be nice. Be informative.**

Closes #5785 from cxzl25/test_jps_local.

Closes #5785

bb456a6 [sychen] Fix flaky test - JpsApplicationOperation with spark local mode

Authored-by: sychen <[email protected]>
Signed-off-by: Cheng Pan <[email protected]>
(cherry picked from commit 19ae399)
Signed-off-by: Cheng Pan <[email protected]>
  • Loading branch information
cxzl25 authored and pan3793 committed Nov 30, 2023
1 parent 08349ae commit 406b573
Showing 1 changed file with 2 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -84,6 +84,8 @@ class JpsApplicationOperationSuite extends KyuubiFunSuite {
val desc1 = jps.getApplicationInfoByTag(id)
assert(desc1.id != null)
assert(desc1.name != null)
assert(!desc1.name.contains("org.apache.spark.launcher.Main"))
assert(desc1.name.contains("org.apache.spark.deploy.SparkSubmit"))
assert(desc1.state == ApplicationState.RUNNING)
val response = jps.killApplicationByTag(id)
assert(response._1, response._2)
Expand Down

0 comments on commit 406b573

Please sign in to comment.