Hi,
I’m wanting to try to fix my own filed k6 issue (#1804). I’m a hard greenhorn at Go but did golang’s tour so am kind of capable to read code. I really want this bug fixed and we all gotta start somewhere, right?
Right now I’m trying to set a baseline before I try out code changes locally by running go test ./...
from the k6 root directory on a release tagged commit, say v0.33.0
. However, I’m getting different FAILs at different places, depending on the platform, macOS or Win10.
My setup:
I installed go 1.16.3 on a macOS 11.5.1 via homebrew and go 1.16.7 on Win10 via golang’s own installer. Both systems are the same network.
On both machines, go get go.k6.io/k6
wasn’t setting up a GOPATH/src
directory, as described on your Contributing page, so I’m working with the codebase cloned from github.
The go test FAILs:
On macOS:
a dozen
--- FAIL: TestDNSResolver (0.21s)
--- FAIL: TestDNSResolver/cache (0.00s)
--- FAIL: TestDNSResolver/cache/1000 (6.40s)
local_test.go:1077:
Error Trace: local_test.go:1077
Error: Error message not equal:
expected: "dial tcp 127.0.0.254:52659: connect: connection refused"
actual : "request timeout"
Test: TestDNSResolver/cache/1000
...
FAIL
FAIL go.k6.io/k6/core/local 12.444s
On Win10:
this one (filepath redacted at “\…\”); german text because german Windows;
--- FAIL: TestClient (0.09s)
--- FAIL: TestClient/LoadNotFound (0.00s)
client_test.go:137:
Error Trace: client_test.go:137
Error: "./does_not_exist.proto: open C:\\Users\\...\\k6\\js\\modules\\k6\\grpc\\does_not_exist.proto: Das System kann die angegebene Datei nicht finden. at go.k6.io/k6/js/common.Bind.func1 (native)" does not contain "no such file or directory"
Test: TestClient/LoadNotFound
FAIL
FAIL go.k6.io/k6/js/modules/k6/grpc 0.559s
a long string of these
time="2021-08-10T21:22:14+02:00" level=warning msg="Request Failed" error="error decompressing response body (gzip: invalid header)"
time="2021-08-10T21:22:14+02:00" level=info msg="Request:\nPOST /digest-auth-with-post/auth/testuser/testpwd HTTP/1.1\nHost: 127.0.0.1:58982\nUser-Agent: TestUserAgent\nContent-Length: 17\nAuthorization: Basic dGVzdHVzZXI6dGVzdHB3ZA==\nAccept-Encoding: gzip\n\nsuper secret body\n" group= iter=0 request_id=c741b661-12a9-4cfb-7591-f35ab2303676 source=http-debug vu=0
time="2021-08-10T21:22:14+02:00" level=warning msg="Request Failed" error="Get \"https://asdajkdahdqiuwhejkasdnakjdnadasdlkas.com\": lookup asdajkdahdqiuwhejkasdnakjdnadasdlkas.com: no such host"
time="2021-08-10T21:22:14+02:00" level=warning msg="Request Failed" error="Get \"http://sdafsgdhfjg.com/\": lookup sdafsgdhfjg.com: no such host"
...
time="2021-08-10T21:22:16+02:00" level=warning msg="Request Failed" error="Get \"http://127.0.0.1:1/pesho\": dial: i/o timeout"
--- FAIL: TestErrorCodes (2.09s)
--- FAIL: TestErrorCodes/Connection_refused_redirect (2.01s)
request_test.go:2078:
Error Trace: request_test.go:2078
Error: Received unexpected error:
Error: wrong error: 'dial: i/o timeout' at <eval>:6:73(50)
Test: TestErrorCodes/Connection_refused_redirect
...
time="2021-08-10T21:22:20+02:00" level=warning msg="A batch request failed" error="invalid URL: parse \"https:// invalidurl.com\": invalid character \" \" in host name"
time="2021-08-10T21:22:20+02:00" level=warning msg="Request Failed" error="invalid URL: parse \"https:// test.k6.io\": invalid character \" \" in host name"
time="2021-08-10T21:22:20+02:00" level=warning msg="Request Failed" error="invalid URL: parse \"https:// test.k6.io\": invalid character \" \" in host name"
FAIL
FAIL go.k6.io/k6/js/modules/k6/http 8.811s
and a lot of these
--- FAIL: TestConstantArrivalRateRunCorrectTiming (0.00s)
--- FAIL: TestConstantArrivalRateRunCorrectTiming/segment_2/3:1_sequence_<nil> (2.02s)
constant_arrival_rate_test.go:215:
Error Trace: constant_arrival_rate_test.go:215
common_test.go:40
minirunner.go:230
helpers.go:88
ramping_arrival_rate.go:549
asm_amd64.s:1371
Error: Max difference between 2021-08-10 21:22:14.4502656 +0200 CEST m=+0.307944801 and 2021-08-10 21:22:14.4654449 +0200 CEST m=+0.323124101 allowed is 12ms, but difference was -15.1793ms
Test: TestConstantArrivalRateRunCorrectTiming/segment_2/3:1_sequence_<nil>
Messages: 6 expectedTime 300ms
What could be my issues? Is this normal for running the full test suite from the root dir?
Sorry if there’s details missing. And sorry for the long post. As I wrote, this is my first go project, so be gentle .
But big thanks in advance for helping out !