Skip to content

Commit

Permalink
test(core): disable parallel TestMetricsEmission on Windows
Browse files Browse the repository at this point in the history
Not a fan of this bandaid, but maybe it resolves the AppVeyor-exclusive
failures.

See #1203 (comment)
  • Loading branch information
Ivan Mirić committed Nov 1, 2019
1 parent 484cafd commit b6650a5
Showing 1 changed file with 9 additions and 2 deletions.
11 changes: 9 additions & 2 deletions core/engine_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -24,6 +24,7 @@ import (
"context"
"fmt"
"net/url"
"runtime"
"testing"
"time"

Expand All @@ -44,6 +45,8 @@ import (
"github.com/loadimpact/k6/stats/dummy"
)

const isWindows = runtime.GOOS == "windows"

// Apply a null logger to the engine and return the hook.
func applyNullLogger(e *Engine) *logtest.Hook {
logger, hook := logtest.NewNullLogger()
Expand Down Expand Up @@ -915,7 +918,9 @@ func TestEmittedMetricsWhenScalingDown(t *testing.T) {
}

func TestMetricsEmission(t *testing.T) {
t.Parallel()
if !isWindows {
t.Parallel()
}

testCases := []struct {
method string
Expand All @@ -938,7 +943,9 @@ func TestMetricsEmission(t *testing.T) {
for _, tc := range testCases {
tc := tc
t.Run(tc.method, func(t *testing.T) {
t.Parallel()
if !isWindows {
t.Parallel()
}
runner, err := js.New(
&loader.SourceData{URL: &url.URL{Path: "/script.js"}, Data: []byte(fmt.Sprintf(`
import { sleep } from "k6";
Expand Down

0 comments on commit b6650a5

Please sign in to comment.