yangwwei commented on code in PR #197:
URL: https://github.com/apache/yunikorn-release/pull/197#discussion_r2072313577


##########
soak/autoscaler/init.go:
##########
@@ -0,0 +1,63 @@
+package autoscaler
+
+import (
+       "fmt"
+       "github.com/apache/yunikorn-release/soak/framework"
+       "github.com/apache/yunikorn-release/soak/logger"
+       "go.uber.org/zap"
+       "os/exec"
+       "strings"
+)
+
+type AutoscalingScenario struct {
+       templateConf framework.Template
+       testCases    []framework.TestCase
+}
+
+func New(config *framework.Config) *AutoscalingScenario {
+       for _, c := range config.Tests {
+               if c.Name == "autoscaling" {
+                       return &AutoscalingScenario{
+                               templateConf: c.Template,
+                               testCases:    c.TestCases,
+                       }
+               }
+       }
+       return nil
+}
+
+func (a *AutoscalingScenario) GetName() string {
+       return "autoscaling"
+}
+
+func (a *AutoscalingScenario) Init() error {
+       return nil
+}
+
+func (a *AutoscalingScenario) Tests() []framework.TestCase {
+       // enable or disable test cases here
+       return a.testCases
+}
+
+func (a *AutoscalingScenario) Run() ([]string, error) {
+       log := logger.Logger
+       results := make([]string, len(a.testCases))
+       for idx, tests := range a.testCases {
+               clusterLoaderConfigPath := tests.ClusterLoaderConfigPath
+               args := []string{fmt.Sprintf("----testconfig=%s", 
clusterLoaderConfigPath),
+                       "--provider=kind", 
"--kubeconfig=/Users/b_achar/.kube/config",
+                       "--v=4", 
"--report-dir=soak/tests/basic-scheduler-throughput/"}
+               cmd := exec.Command("clusterloader", args...)
+               log.Info("Clusterloader command to be executed",
+                       zap.String("command", fmt.Sprintf("clusterloader %s", 
strings.Join(args, " "))))
+
+               _, err := cmd.CombinedOutput()

Review Comment:
   it seems like we ignored the output. I think the logs is important, can we 
make sure we capture the output and log somewhere?



##########
soak/autoscaler/init.go:
##########
@@ -0,0 +1,63 @@
+package autoscaler
+
+import (
+       "fmt"
+       "github.com/apache/yunikorn-release/soak/framework"
+       "github.com/apache/yunikorn-release/soak/logger"
+       "go.uber.org/zap"
+       "os/exec"
+       "strings"
+)
+
+type AutoscalingScenario struct {
+       templateConf framework.Template
+       testCases    []framework.TestCase
+}
+
+func New(config *framework.Config) *AutoscalingScenario {
+       for _, c := range config.Tests {
+               if c.Name == "autoscaling" {
+                       return &AutoscalingScenario{
+                               templateConf: c.Template,
+                               testCases:    c.TestCases,
+                       }
+               }
+       }
+       return nil
+}
+
+func (a *AutoscalingScenario) GetName() string {
+       return "autoscaling"
+}
+
+func (a *AutoscalingScenario) Init() error {
+       return nil
+}
+
+func (a *AutoscalingScenario) Tests() []framework.TestCase {
+       // enable or disable test cases here
+       return a.testCases
+}
+
+func (a *AutoscalingScenario) Run() ([]string, error) {
+       log := logger.Logger
+       results := make([]string, len(a.testCases))
+       for idx, tests := range a.testCases {
+               clusterLoaderConfigPath := tests.ClusterLoaderConfigPath
+               args := []string{fmt.Sprintf("----testconfig=%s", 
clusterLoaderConfigPath),
+                       "--provider=kind", 
"--kubeconfig=/Users/b_achar/.kube/config",

Review Comment:
   "--kubeconfig=/Users/b_achar/.kube/config"
   
   is this supposed to be hard coded here?



-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: reviews-unsubscr...@yunikorn.apache.org

For queries about this service, please contact Infrastructure at:
us...@infra.apache.org

Reply via email to