From 567ed1208aafd25a8e111e2c93c6875372764c5e Mon Sep 17 00:00:00 2001 From: Povilas Versockas Date: Tue, 28 May 2019 11:28:28 +0300 Subject: [PATCH] Fixes after review --- test/e2e/spinup_test.go | 17 ++++------------- 1 file changed, 4 insertions(+), 13 deletions(-) diff --git a/test/e2e/spinup_test.go b/test/e2e/spinup_test.go index ba4482ce29e..8782d812043 100644 --- a/test/e2e/spinup_test.go +++ b/test/e2e/spinup_test.go @@ -75,7 +75,7 @@ func (c *cmdExec) Start(stdout io.Writer, stderr io.Writer) error { func (c *cmdExec) Kill() error { return c.Process.Signal(syscall.SIGKILL) } -func (c *cmdExec) String() string { return fmt.Sprintf("%s %s", c.Path, c.Args[1]) } +func (c *cmdExec) String() string { return fmt.Sprintf("%s %v", c.Path, c.Args[1:]) } type cmdScheduleFunc func(workDir string) ([]Exec, error) @@ -151,16 +151,6 @@ func receiver(i int, config string) cmdScheduleFunc { } } -func querier(i int, replicaLabel string, staticStores ...string) cmdScheduleFunc { - return func(_ string) ([]Exec, error) { - args := defaultQuerierFlags(i, replicaLabel) - for _, s := range staticStores { - args = append(args, "--store", s) - } - return []Exec{newCmdExec(exec.Command("thanos", args...))}, nil - } -} - func querierWithStoreFlags(i int, replicaLabel string, storesAddresses ...string) cmdScheduleFunc { return func(_ string) ([]Exec, error) { args := defaultQuerierFlags(i, replicaLabel) @@ -343,7 +333,6 @@ func (c *sameProcessGRPCServiceExec) Start(stdout io.Writer, stderr io.Writer) e srvChan <- err _, _ = c.stderr.Write([]byte(fmt.Sprintf("server failed: %s", err))) } - }() c.srvChan = srvChan return nil @@ -356,6 +345,7 @@ func (c *sameProcessGRPCServiceExec) Wait() error { } return err } + func (c *sameProcessGRPCServiceExec) Kill() error { c.cancel() c.srv.Stop() @@ -557,7 +547,8 @@ func defaultQuerierFlags(i int, replicaLabel string) []string { } func defaultRulerFlags(i int, dbDir string, ruleDir string) []string { - return []string{"rule", + return []string{ + "rule", "--debug.name", fmt.Sprintf("rule-%d", i), "--label", fmt.Sprintf(`replica="%d"`, i), "--data-dir", dbDir,