This is an automated email from the ASF dual-hosted git repository.
chia7712 pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/yunikorn-core.git
The following commit(s) were added to refs/heads/master by this push:
new e04b7bf4 [YUNIKORN-2298] remove `configStateDumpFilePath` from
handlers_test.go (#768)
e04b7bf4 is described below
commit e04b7bf4ca0c9a4e988d74d44d4ff57bafdbc1c8
Author: Kuan-Po Tseng <[email protected]>
AuthorDate: Wed Jan 3 02:00:07 2024 +0800
[YUNIKORN-2298] remove `configStateDumpFilePath` from handlers_test.go
(#768)
Reviewers: Chia-Ping Tsai <[email protected]>
---
pkg/webservice/handlers_test.go | 25 ++++---------------------
1 file changed, 4 insertions(+), 21 deletions(-)
diff --git a/pkg/webservice/handlers_test.go b/pkg/webservice/handlers_test.go
index bf21cfeb..12c681b5 100644
--- a/pkg/webservice/handlers_test.go
+++ b/pkg/webservice/handlers_test.go
@@ -106,18 +106,6 @@ partitions:
- name: noapps
`
-const configStateDumpFilePath = `
-partitions:
- - name: default
- statedumpfilepath: "tmp/non-default-yunikorn-state.txt"
- queues:
- - name: root
- submitacl: "*"
- queues:
- - name: default
- - name: noapps
-`
-
const configMultiPartitions = `
partitions:
-
@@ -1413,7 +1401,7 @@ func TestFullStateDumpPath(t *testing.T) {
}
configs.SetConfigMap(configMap)
- schedulerContext = prepareSchedulerContext(t, false)
+ schedulerContext = prepareSchedulerContext(t)
partitionContext := schedulerContext.GetPartitionMapClone()
context := partitionContext[normalizedPartitionName]
@@ -1597,7 +1585,7 @@ func TestUsersAndGroupsResourceUsage(t *testing.T) {
}
func TestGetEvents(t *testing.T) {
- prepareSchedulerContext(t, false)
+ prepareSchedulerContext(t)
appEvent, nodeEvent, queueEvent := addEvents(t)
checkAllEvents(t, []*si.EventRecord{appEvent, nodeEvent, queueEvent})
@@ -1752,13 +1740,8 @@ func getEventRecordDao(t *testing.T, req *http.Request)
dao.EventRecordDAO {
return eventDao
}
-func prepareSchedulerContext(t *testing.T, stateDumpConf bool)
*scheduler.ClusterContext {
- var config []byte
- if !stateDumpConf {
- config = []byte(configDefault)
- } else {
- config = []byte(configStateDumpFilePath)
- }
+func prepareSchedulerContext(t *testing.T) *scheduler.ClusterContext {
+ config := []byte(configDefault)
var err error
schedulerContext, err = scheduler.NewClusterContext(rmID, policyGroup,
config)
assert.NilError(t, err, "Error when load clusterInfo from config")
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]