Skip to content

Commit d66fe7e

Browse files
committed
asim: move some variables to an outer scope
This commit moves certain variables above the configuration declarations so they can be reused in an outer scope.
1 parent 507f301 commit d66fe7e

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

pkg/kv/kvserver/asim/tests/datadriven_simulation_test.go

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -449,6 +449,9 @@ func TestDataDriven(t *testing.T) {
449449
seed := int64(42)
450450
duration := 30 * time.Minute
451451
name := strings.TrimSuffix(filepath.Base(path), filepath.Ext(path))
452+
plotDir := datapathutils.TestDataPath(t, "generated", name)
453+
var rewrite bool
454+
require.NoError(t, sniffarg.DoEnv("rewrite", &rewrite))
452455
var cfgs []string // configurations to run the simulation with
453456
var metrics []string // metrics to summarize
454457

@@ -544,9 +547,6 @@ func TestDataDriven(t *testing.T) {
544547

545548
// Generate artifacts. Hash artifact input data to ensure they are
546549
// up to date.
547-
var rewrite bool
548-
require.NoError(t, sniffarg.DoEnv("rewrite", &rewrite))
549-
plotDir := datapathutils.TestDataPath(t, "generated", name)
550550
hasher := fnv.New64a()
551551
// TODO(tbg): need to decide whether multiple evals in a single file
552552
// is a feature or an anti-pattern. If it's a feature, we should let

0 commit comments

Comments
 (0)