diff --git a/cmd/root_test.go b/cmd/root_test.go index fc052db60..a4e931a78 100644 --- a/cmd/root_test.go +++ b/cmd/root_test.go @@ -55,6 +55,9 @@ func tExec(t *testing.T, cmd *cobra.Command, out io.Reader, w io.WriteCloser) (o if err := w.Close(); err != nil { return output, fmt.Errorf("closing cmd's stdout: %v", err) } + + // NOTE: if cmd.Execute doesn't return, then this select (and + // therefore the one-second timeout, won't be reached) select { case <-done: case <-time.After(time.Second * 1): @@ -64,7 +67,7 @@ func tExec(t *testing.T, cmd *cobra.Command, out io.Reader, w io.WriteCloser) (o } // ExecNewRootCommand executes the pilosa root command with the given arguments -// and returns it's output. It will fail if the command does not complete within +// and returns its output. It will fail if the command does not complete within // 1 second. func ExecNewRootCommand(t *testing.T, args ...string) (string, error) { out, w := io.Pipe() diff --git a/server/config.go b/server/config.go index 2d855dea6..34c155133 100644 --- a/server/config.go +++ b/server/config.go @@ -98,14 +98,14 @@ type Config struct { // intentionally not defined as a flag... only exposed here so // that we can limit the size while running tests in CI so we // don't exhaust the goroutine limit. - WorkerPoolSize int + WorkerPoolSize int `toml:"-"` // ImportWorkerPoolSize controls how many goroutines are created for // processing importRoaring jobs. Defaults to runtime.NumCPU(). It is // intentionally not defined as a flag... only exposed here so // that we can limit the size while running tests in CI so we // don't exhaust the goroutine limit. - ImportWorkerPoolSize int + ImportWorkerPoolSize int `toml:"-"` Cluster struct { // Disabled controls whether clustering functionality is enabled.