From ad88f4fac8f3b2795747535a706102f007ae2ca0 Mon Sep 17 00:00:00 2001 From: Matt Jaffee Date: Mon, 1 Mar 2021 21:06:41 -0600 Subject: [PATCH] refactor tests to reuse clusters more --- executor_test.go | 14 ++------------ 1 file changed, 2 insertions(+), 12 deletions(-) diff --git a/executor_test.go b/executor_test.go index 33a70e5b7..40b02d7fa 100644 --- a/executor_test.go +++ b/executor_test.go @@ -6857,23 +6857,13 @@ func TestVariousQueries(t *testing.T) { variousQueries(t, c) variousQueriesOnTimeFields(t, c) - }) - } -} - -func TestVariousQueriesOnPercentiles(t *testing.T) { - for _, clusterSize := range []int{1, 3, 4, 7} { - t.Run(fmt.Sprintf("%d-node", clusterSize), func(t *testing.T) { - variousQueriesOnPercentiles(t, clusterSize) + variousQueriesOnPercentiles(t, c) }) } } // tests for abbreviating time values in queries -func variousQueriesOnPercentiles(t *testing.T, clusterSize int) { - c := test.MustRunCluster(t, clusterSize) - defer c.Close() - +func variousQueriesOnPercentiles(t *testing.T, c *test.Cluster) { // todo, make rand more random, 42 isnt the answer to everything // however, to make tests reproducible, seed should be printed // on failure?