Skip to content

Commit

Permalink
fix tests
Browse files Browse the repository at this point in the history
  • Loading branch information
mstoykov authored and inancgumus committed Sep 29, 2021
1 parent be4f600 commit 9dd3f18
Showing 1 changed file with 4 additions and 2 deletions.
6 changes: 4 additions & 2 deletions core/local/k6execution_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -412,17 +412,19 @@ func TestExecutionInfoAll(t *testing.T) {
logHook := testutils.SimpleLogrusHook{HookedLevels: []logrus.Level{logrus.InfoLevel}}
logger.AddHook(&logHook)

registry := metrics.NewRegistry()
builtinMetrics := metrics.RegisterBuiltinMetrics(registry)
runner, err := js.New(logger, &loader.SourceData{
URL: &url.URL{Path: "/script.js"},
Data: []byte(tc.script),
}, nil, lib.RuntimeOptions{})
}, nil, lib.RuntimeOptions{}, builtinMetrics, registry)
require.NoError(t, err)

ctx, cancel, execScheduler, samples := newTestExecutionScheduler(t, runner, logger, lib.Options{})
defer cancel()

errCh := make(chan error, 1)
go func() { errCh <- execScheduler.Run(ctx, ctx, samples) }()
go func() { errCh <- execScheduler.Run(ctx, ctx, samples, builtinMetrics) }()

select {
case err := <-errCh:
Expand Down

0 comments on commit 9dd3f18

Please sign in to comment.