Welcome to mirror list, hosted at ThFree Co, Russian Federation.

gitlab.com/gitlab-org/gitaly.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorPatrick Steinhardt <psteinhardt@gitlab.com>2023-09-15 11:16:19 +0300
committerPatrick Steinhardt <psteinhardt@gitlab.com>2023-09-15 11:25:06 +0300
commitf109b6eac14c91142724b3d248bacf7fa2bd34a7 (patch)
tree5748749b4891cbb142513ba44d00f630f92d5555
parentf521e116b2fb4731145b732e8a372f9db99ef986 (diff)
grpcstats: Parallelize tests
Add missing calls to `t.Parallel()` in our grpcstats tests.
-rw-r--r--internal/grpc/grpcstats/stats_test.go9
1 files changed, 9 insertions, 0 deletions
diff --git a/internal/grpc/grpcstats/stats_test.go b/internal/grpc/grpcstats/stats_test.go
index 84d13930c..186a93e77 100644
--- a/internal/grpc/grpcstats/stats_test.go
+++ b/internal/grpc/grpcstats/stats_test.go
@@ -10,6 +10,8 @@ import (
)
func TestPayloadBytes_TagRPC(t *testing.T) {
+ t.Parallel()
+
ctx := testhelper.Context(t)
ctx = (&PayloadBytes{}).TagRPC(ctx, nil)
require.Equal(t,
@@ -19,9 +21,12 @@ func TestPayloadBytes_TagRPC(t *testing.T) {
}
func TestPayloadBytes_HandleRPC(t *testing.T) {
+ t.Parallel()
+
ctx := testhelper.Context(t)
handler := &PayloadBytes{}
ctx = handler.TagRPC(ctx, nil)
+
handler.HandleRPC(ctx, nil) // sanity check we don't fail anything
handler.HandleRPC(ctx, &stats.Begin{}) // sanity check we don't fail anything
handler.HandleRPC(ctx, &stats.InPayload{Length: 42})
@@ -47,6 +52,8 @@ func TestPayloadBytes_HandleRPC(t *testing.T) {
}
func TestPayloadBytesStats_Fields(t *testing.T) {
+ t.Parallel()
+
bytesStats := PayloadBytesStats{InPayloadBytes: 80, OutPayloadBytes: 90}
require.Equal(t, logrus.Fields{
"grpc.request.payload_bytes": int64(80),
@@ -55,6 +62,8 @@ func TestPayloadBytesStats_Fields(t *testing.T) {
}
func TestFieldsProducer(t *testing.T) {
+ t.Parallel()
+
ctx := testhelper.Context(t)
t.Run("ok", func(t *testing.T) {