This is an automated email from the ASF dual-hosted git repository.
chengpan pushed a commit to branch branch-1.8
in repository https://gitbox.apache.org/repos/asf/kyuubi.git
The following commit(s) were added to refs/heads/branch-1.8 by this push:
new 0e2bc13e7 [KYUUBI #5305][FOLLOWUP] Fix get local log UT
0e2bc13e7 is described below
commit 0e2bc13e7453571b86a5080e950bdeafd266e185
Author: Cheng Pan <[email protected]>
AuthorDate: Tue Sep 19 12:15:44 2023 +0800
[KYUUBI #5305][FOLLOWUP] Fix get local log UT
### _Why are the changes needed?_
Fix UT fail introduced by #5305
### _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/master/contributing/code/testing.html#running-tests)
locally before make a pull request
### _Was this patch authored or co-authored using generative AI tooling?_
No
Closes #5307 from zwangsheng/KYUUBI#5305-follow-up.
Closes #5305
82a050493 [Cheng Pan] Update
kyuubi-server/src/test/scala/org/apache/kyuubi/server/api/v1/BatchesResourceSuite.scala
5c192c908 [zwangsheng] [KYUUBI #5305][FOLLOWUP] Fix get local log ut
Lead-authored-by: Cheng Pan <[email protected]>
Co-authored-by: zwangsheng <[email protected]>
Signed-off-by: Cheng Pan <[email protected]>
(cherry picked from commit 2732449d3ab378f061f75a25cda32d7cdc4a5f78)
Signed-off-by: Cheng Pan <[email protected]>
---
.../apache/kyuubi/server/api/v1/BatchesResourceSuite.scala | 13 +++++++++++--
1 file changed, 11 insertions(+), 2 deletions(-)
diff --git
a/kyuubi-server/src/test/scala/org/apache/kyuubi/server/api/v1/BatchesResourceSuite.scala
b/kyuubi-server/src/test/scala/org/apache/kyuubi/server/api/v1/BatchesResourceSuite.scala
index 3a47461a2..7270f68d6 100644
---
a/kyuubi-server/src/test/scala/org/apache/kyuubi/server/api/v1/BatchesResourceSuite.scala
+++
b/kyuubi-server/src/test/scala/org/apache/kyuubi/server/api/v1/BatchesResourceSuite.scala
@@ -623,8 +623,17 @@ abstract class BatchesResourceSuiteBase extends
KyuubiFunSuite
.queryParam("size", "1")
.request(MediaType.APPLICATION_JSON_TYPE)
.get()
- assert(logResponse.getStatus === 404)
- assert(logResponse.readEntity(classOf[String]).contains("No local log
found"))
+ batchVersion match {
+ case "1" =>
+ assert(logResponse.getStatus === 404)
+ assert(logResponse.readEntity(classOf[String]).contains("No local log
found"))
+ case "2" =>
+ assert(logResponse.getStatus === 200)
+ assert(logResponse.readEntity(classOf[String]).contains(
+ s"Batch ${metadata.identifier} is waiting for submitting"))
+ case _ =>
+ fail(s"unexpected batch version: $batchVersion")
+ }
// get local batch log that is not existing
logResponse =
webTarget.path(s"api/v1/batches/${UUID.randomUUID.toString}/localLog")