Skip to content

Commit

Permalink
fix
Browse files Browse the repository at this point in the history
  • Loading branch information
turboFei committed Jun 6, 2022
1 parent e15b463 commit 83d5d7d
Show file tree
Hide file tree
Showing 3 changed files with 5 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -64,7 +64,7 @@ public GetBatchesResponse listBatches(
params.put("createTime", createTime);
}
if (null != endTime && endTime >= 0) {
params.put("endTime", createTime);
params.put("endTime", endTime);
}
params.put("from", from);
params.put("size", size);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -209,6 +209,7 @@ class JDBCStateStore(conf: KyuubiConf) extends StateStore with Logging {
params += createTime
}
if (endTime > 0) {
whereConditions += " end_time > 0 "
whereConditions += " end_time <= ? "
params += endTime
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -133,6 +133,9 @@ class BatchRestApiSuite extends RestClientTestHelper {
var listBatchesResp = batchRestApi.listBatches("SPARK", null, null, null, null, 0, Int.MaxValue)
assert(listBatchesResp.getTotal > 0)

listBatchesResp = batchRestApi.listBatches("SPARK", null, null, null, 1000, 0, Int.MaxValue)
assert(listBatchesResp.getTotal === 0)

// list batches with non-existing user
listBatchesResp =
batchRestApi.listBatches("SPARK", "non_existing_user", null, 0, 0, 0, Int.MaxValue)
Expand Down

0 comments on commit 83d5d7d

Please sign in to comment.