Skip to content

Commit

Permalink
✅ add parallel running
Browse files Browse the repository at this point in the history
Signed-off-by: vankichi <kyukawa315@gmail.com>
  • Loading branch information
vankichi authored and kevindiu committed Feb 8, 2021
1 parent 4501359 commit 887a61b
Showing 1 changed file with 22 additions and 4 deletions.
26 changes: 22 additions & 4 deletions internal/errors/tensorflow_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -19,9 +19,12 @@ package errors
import (
"math"
"testing"

"go.uber.org/goleak"
)

func TestErrFailedToCastTF(t *testing.T) {
t.Parallel()
type args struct {
v interface{}
}
Expand Down Expand Up @@ -179,8 +182,11 @@ func TestErrFailedToCastTF(t *testing.T) {
},
},
}
for _, test := range tests {
for _, tc := range tests {
test := tc
t.Run(test.name, func(tt *testing.T) {
tt.Parallel()
defer goleak.VerifyNone(tt, goleak.IgnoreCurrent())
if test.beforeFunc != nil {
test.beforeFunc()
}
Expand All @@ -200,6 +206,7 @@ func TestErrFailedToCastTF(t *testing.T) {
}

func TestErrInputLength(t *testing.T) {
t.Parallel()
type args struct {
iLength int
fLength int
Expand Down Expand Up @@ -260,8 +267,11 @@ func TestErrInputLength(t *testing.T) {
},
},
}
for _, test := range tests {
for _, tc := range tests {
test := tc
t.Run(test.name, func(tt *testing.T) {
tt.Parallel()
defer goleak.VerifyNone(tt, goleak.IgnoreCurrent())
if test.beforeFunc != nil {
test.beforeFunc()
}
Expand All @@ -281,6 +291,7 @@ func TestErrInputLength(t *testing.T) {
}

func TestErrNilTensorTF(t *testing.T) {
t.Parallel()
type args struct {
v interface{}
}
Expand Down Expand Up @@ -438,8 +449,11 @@ func TestErrNilTensorTF(t *testing.T) {
},
},
}
for _, test := range tests {
for _, tc := range tests {
test := tc
t.Run(test.name, func(tt *testing.T) {
tt.Parallel()
defer goleak.VerifyNone(tt, goleak.IgnoreCurrent())
if test.beforeFunc != nil {
test.beforeFunc()
}
Expand All @@ -459,6 +473,7 @@ func TestErrNilTensorTF(t *testing.T) {
}

func TestErrNilTensorValueTF(t *testing.T) {
t.Parallel()
type args struct {
v interface{}
}
Expand Down Expand Up @@ -616,8 +631,11 @@ func TestErrNilTensorValueTF(t *testing.T) {
},
},
}
for _, test := range tests {
for _, tc := range tests {
test := tc
t.Run(test.name, func(tt *testing.T) {
tt.Parallel()
defer goleak.VerifyNone(tt, goleak.IgnoreCurrent())
if test.beforeFunc != nil {
test.beforeFunc()
}
Expand Down

0 comments on commit 887a61b

Please sign in to comment.