Failures running smarthttp tests on MacOS
When running the internal/gitaly/service/smarthttp
tests in parallel on MacOS we appar to be getting a number of failures.
These tests all appear to work when TEST_OPTIONS="-parallel=1"
There is a certain amount of flakiness to this, so it is not always reproducible especially in smaller suites.
I have experienced it more often when running the entire suite of tests, or when running a subset of tests such as TEST_PACKAGES=./internal/gitaly/service/...
# System info
# macOS Monterey - Version 12.4 / go version go1.17.7 darwin/amd64 / git version 2.36.1
mkdir -p $(pwd)/tmp
TEST_TMP_DIR=$(pwd)/tmp make test-go
TEST_PACKAGES=./internal/gitaly/service/... TEST_TMP_DIR=$(pwd)/tmp make test-go
Failure Errors
=== Failed
=== FAIL: internal/gitaly/service/smarthttp TestSuccessfulReceivePackRequest (13.74s)
receive_pack_test.go:87:
Error Trace: receive_pack_test.go:87
Error: Not equal:
expected: "0049\x01000eunpack ok\n0019ok refs/heads/master\n0019ok refs/heads/branch\n00000000"
actual : "0005\x010049\x01000eunpack ok\n0019ok refs/heads/master\n0019ok refs/heads/branch\n00000000"
Diff:
--- Expected
+++ Actual
@@ -1,2 +1,2 @@
-0049000eunpack ok
+00050049000eunpack ok
0019ok refs/heads/master
Test: TestSuccessfulReceivePackRequest
Messages: Expected response to be "0049\x01000eunpack ok\n0019ok refs/heads/master\n0019ok refs/heads/branch\n00000000", got "0005\x010049\x01000eunpack ok\n0019ok refs/heads/master\n0019ok refs/heads/branch\n00000000"
=== FAIL: internal/gitaly/service/smarthttp TestFailedReceivePackRequestDueToHooksFailure (15.69s)
receive_pack_test.go:266:
Error Trace: receive_pack_test.go:266
Error: Not equal:
expected: "007d\x01000eunpack ok\n0033ng refs/heads/master pre-receive hook declined\n0033ng refs/heads/branch pre-receive hook declined\n00000000"
actual : "0005\x01007d\x01000eunpack ok\n0033ng refs/heads/master pre-receive hook declined\n0033ng refs/heads/branch pre-receive hook declined\n00000000"
Diff:
--- Expected
+++ Actual
@@ -1,2 +1,2 @@
-007d000eunpack ok
+0005007d000eunpack ok
0033ng refs/heads/master pre-receive hook declined
Test: TestFailedReceivePackRequestDueToHooksFailure
Messages: Expected response to be "007d\x01000eunpack ok\n0033ng refs/heads/master pre-receive hook declined\n0033ng refs/heads/branch pre-receive hook declined\n00000000", got "0005\x01007d\x01000eunpack ok\n0033ng refs/heads/master pre-receive hook declined\n0033ng refs/heads/branch pre-receive hook declined\n00000000"
=== FAIL: internal/gitaly/service/smarthttp TestPostReceiveWithTransactionsViaPraefect (19.18s)
receive_pack_test.go:738:
Error Trace: receive_pack_test.go:738
Error: Not equal:
expected: "0049\x01000eunpack ok\n0019ok refs/heads/master\n0019ok refs/heads/branch\n00000000"
actual : "0005\x010049\x01000eunpack ok\n0019ok refs/heads/master\n0019ok refs/heads/branch\n00000000"
Diff:
--- Expected
+++ Actual
@@ -1,2 +1,2 @@
-0049000eunpack ok
+00050049000eunpack ok
0019ok refs/heads/master
Test: TestPostReceiveWithTransactionsViaPraefect
Messages: Expected response to be "0049\x01000eunpack ok\n0019ok refs/heads/master\n0019ok refs/heads/branch\n00000000", got "0005\x010049\x01000eunpack ok\n0019ok refs/heads/master\n0019ok refs/heads/branch\n00000000"
=== FAIL: internal/gitaly/service/smarthttp TestPostReceivePackToHooks (21.09s)
receive_pack_test.go:683:
Error Trace: receive_pack_test.go:683
Error: Not equal:
expected: "0049\x01000eunpack ok\n0019ok refs/heads/master\n0019ok refs/heads/branch\n00000000"
actual : "0005\x010005\x010049\x01000eunpack ok\n0019ok refs/heads/master\n0019ok refs/heads/branch\n00000000"
Diff:
--- Expected
+++ Actual
@@ -1,2 +1,2 @@
-0049000eunpack ok
+000500050049000eunpack ok
0019ok refs/heads/master
Test: TestPostReceivePackToHooks
Messages: Expected response to be "0049\x01000eunpack ok\n0019ok refs/heads/master\n0019ok refs/heads/branch\n00000000", got "0005\x010005\x010049\x01000eunpack ok\n0019ok refs/heads/master\n0019ok refs/heads/branch\n00000000"
Edited by John McDonnell