Skip to content

Commit

Permalink
Merge pull request #2162 from Shopify/dnwe/remove-parallel
Browse files Browse the repository at this point in the history
fix(test): remove t.Parallel()
  • Loading branch information
dnwe authored Feb 24, 2022
2 parents 5d76fa6 + 8ec73f6 commit 59d2a43
Show file tree
Hide file tree
Showing 112 changed files with 2 additions and 439 deletions.
2 changes: 1 addition & 1 deletion .golangci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -60,7 +60,7 @@ linters:
- misspell
# - nakedret
- nilerr
- paralleltest
# - paralleltest
# - scopelint
- staticcheck
- structcheck
Expand Down
2 changes: 1 addition & 1 deletion Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ default: fmt get update test lint

GO := go
GOBUILD := CGO_ENABLED=0 $(GO) build $(BUILD_FLAG)
GOTEST := $(GO) test -gcflags='-l' -p 1 -parallel 1 -race -timeout 10m -coverprofile=profile.out -covermode=atomic
GOTEST := $(GO) test -race -timeout 10m -coverprofile=profile.out -covermode=atomic

FILES := $(shell find . -name '*.go' -type f -not -name '*.pb.go' -not -name '*_generated.go' -not -name '*_test.go')
TESTS := $(shell find . -name '*.go' -type f -not -name '*.pb.go' -not -name '*_generated.go' -name '*_test.go')
Expand Down
2 changes: 0 additions & 2 deletions acl_create_request_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,6 @@ var (
)

func TestCreateAclsRequestv0(t *testing.T) {
t.Parallel()
req := &CreateAclsRequest{
Version: 0,
AclCreations: []*AclCreation{
Expand All @@ -48,7 +47,6 @@ func TestCreateAclsRequestv0(t *testing.T) {
}

func TestCreateAclsRequestv1(t *testing.T) {
t.Parallel()
req := &CreateAclsRequest{
Version: 1,
AclCreations: []*AclCreation{
Expand Down
1 change: 0 additions & 1 deletion acl_create_response_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,6 @@ var (
)

func TestCreateAclsResponse(t *testing.T) {
t.Parallel()
errmsg := "error"
resp := &CreateAclsResponse{
ThrottleTime: 100 * time.Millisecond,
Expand Down
2 changes: 0 additions & 2 deletions acl_delete_request_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -63,7 +63,6 @@ var (
)

func TestDeleteAclsRequest(t *testing.T) {
t.Parallel()
req := &DeleteAclsRequest{
Filters: []*AclFilter{{
ResourceType: AclResourceAny,
Expand Down Expand Up @@ -92,7 +91,6 @@ func TestDeleteAclsRequest(t *testing.T) {
}

func TestDeleteAclsRequestV1(t *testing.T) {
t.Parallel()
req := &DeleteAclsRequest{
Version: 1,
Filters: []*AclFilter{{
Expand Down
1 change: 0 additions & 1 deletion acl_delete_response_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,6 @@ var deleteAclsResponse = []byte{
}

func TestDeleteAclsResponse(t *testing.T) {
t.Parallel()
resp := &DeleteAclsResponse{
ThrottleTime: 100 * time.Millisecond,
FilterResponses: []*FilterResponse{{
Expand Down
2 changes: 0 additions & 2 deletions acl_describe_request_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,6 @@ var (
)

func TestAclDescribeRequestV0(t *testing.T) {
t.Parallel()
resourcename := "topic"
principal := "principal"
host := "host"
Expand All @@ -45,7 +44,6 @@ func TestAclDescribeRequestV0(t *testing.T) {
}

func TestAclDescribeRequestV1(t *testing.T) {
t.Parallel()
resourcename := "topic"
principal := "principal"
host := "host"
Expand Down
1 change: 0 additions & 1 deletion acl_describe_response_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,6 @@ var aclDescribeResponseError = []byte{
}

func TestAclDescribeResponse(t *testing.T) {
t.Parallel()
errmsg := "error"
resp := &DescribeAclsResponse{
ThrottleTime: 100 * time.Millisecond,
Expand Down
4 changes: 0 additions & 4 deletions acl_types_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,6 @@ import (
)

func TestAclOperationTextMarshal(t *testing.T) {
t.Parallel()
for i := AclOperationUnknown; i <= AclOperationIdempotentWrite; i++ {
text, err := i.MarshalText()
if err != nil {
Expand All @@ -23,7 +22,6 @@ func TestAclOperationTextMarshal(t *testing.T) {
}

func TestAclPermissionTypeTextMarshal(t *testing.T) {
t.Parallel()
for i := AclPermissionUnknown; i <= AclPermissionAllow; i++ {
text, err := i.MarshalText()
if err != nil {
Expand All @@ -41,7 +39,6 @@ func TestAclPermissionTypeTextMarshal(t *testing.T) {
}

func TestAclResourceTypeTextMarshal(t *testing.T) {
t.Parallel()
for i := AclResourceUnknown; i <= AclResourceTransactionalID; i++ {
text, err := i.MarshalText()
if err != nil {
Expand All @@ -59,7 +56,6 @@ func TestAclResourceTypeTextMarshal(t *testing.T) {
}

func TestAclResourcePatternTypeTextMarshal(t *testing.T) {
t.Parallel()
for i := AclPatternUnknown; i <= AclPatternPrefixed; i++ {
text, err := i.MarshalText()
if err != nil {
Expand Down
1 change: 0 additions & 1 deletion add_offsets_to_txn_request_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,6 @@ var addOffsetsToTxnRequest = []byte{
}

func TestAddOffsetsToTxnRequest(t *testing.T) {
t.Parallel()
req := &AddOffsetsToTxnRequest{
TransactionalID: "txn",
ProducerID: 8000,
Expand Down
1 change: 0 additions & 1 deletion add_offsets_to_txn_response_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,6 @@ var addOffsetsToTxnResponse = []byte{
}

func TestAddOffsetsToTxnResponse(t *testing.T) {
t.Parallel()
resp := &AddOffsetsToTxnResponse{
ThrottleTime: 100 * time.Millisecond,
Err: ErrInvalidProducerEpoch,
Expand Down
1 change: 0 additions & 1 deletion add_partitions_to_txn_request_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,6 @@ var addPartitionsToTxnRequest = []byte{
}

func TestAddPartitionsToTxnRequest(t *testing.T) {
t.Parallel()
req := &AddPartitionsToTxnRequest{
TransactionalID: "txn",
ProducerID: 8000,
Expand Down
1 change: 0 additions & 1 deletion add_partitions_to_txn_response_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,6 @@ var addPartitionsToTxnResponse = []byte{
}

func TestAddPartitionsToTxnResponse(t *testing.T) {
t.Parallel()
resp := &AddPartitionsToTxnResponse{
ThrottleTime: 100 * time.Millisecond,
Errors: map[string][]*PartitionError{
Expand Down
Loading

0 comments on commit 59d2a43

Please sign in to comment.