configurable data path concurrency: all in one json

Signed-off-by: Lyndon-Li <lyonghui@vmware.com>
This commit is contained in:
Lyndon-Li
2023-11-08 12:02:02 +08:00
parent c638ca557e
commit db43200cc8
5 changed files with 61 additions and 49 deletions
+1 -1
View File
@@ -499,7 +499,7 @@ func (s *nodeAgentServer) getDataPathConcurrentNum(defaultNum int) int {
}
if configs == nil || configs.DataPathConcurrency == nil {
s.logger.Infof("Node agent configs are not found, use the default number %v", defaultNum)
s.logger.Infof("Concurrency configs are not found, use the default number %v", defaultNum)
return defaultNum
}
+2 -2
View File
@@ -161,7 +161,7 @@ func Test_getDataPathConcurrentNum(t *testing.T) {
getFunc: func(context.Context, string, kubernetes.Interface) (*nodeagent.Configs, error) {
return nil, nil
},
expectLog: fmt.Sprintf("Node agent configs are not found, use the default number %v", defaultNum),
expectLog: fmt.Sprintf("Concurrency configs are not found, use the default number %v", defaultNum),
expectNum: defaultNum,
},
{
@@ -169,7 +169,7 @@ func Test_getDataPathConcurrentNum(t *testing.T) {
getFunc: func(context.Context, string, kubernetes.Interface) (*nodeagent.Configs, error) {
return &nodeagent.Configs{}, nil
},
expectLog: fmt.Sprintf("Node agent configs are not found, use the default number %v", defaultNum),
expectLog: fmt.Sprintf("Concurrency configs are not found, use the default number %v", defaultNum),
expectNum: defaultNum,
},
{