From 99ad7362578531d80d5ae83949a03b506182195e Mon Sep 17 00:00:00 2001 From: Jonathan Yu Date: Sat, 29 Jan 2022 20:02:30 +0000 Subject: [PATCH] chore: add tparallel linter Add the tparallel linter, which checks that subtests of a parallel test also run in parallel. --- .golangci.yml | 1 + database/pubsub_memory_test.go | 2 ++ 2 files changed, 3 insertions(+) diff --git a/.golangci.yml b/.golangci.yml index 1231a65ddb58f..4967aedf54baa 100644 --- a/.golangci.yml +++ b/.golangci.yml @@ -241,6 +241,7 @@ linters: - staticcheck - structcheck - tenv + - tparallel - typecheck - unconvert - unused diff --git a/database/pubsub_memory_test.go b/database/pubsub_memory_test.go index 2a930fb3e05c9..cc69df51bd38b 100644 --- a/database/pubsub_memory_test.go +++ b/database/pubsub_memory_test.go @@ -14,6 +14,8 @@ func TestPubsubMemory(t *testing.T) { t.Parallel() t.Run("Memory", func(t *testing.T) { + t.Parallel() + pubsub := database.NewPubsubInMemory() event := "test" data := "testing"