Enable parallel testing

This commit is contained in:
Tevin Zhang 2020-06-30 10:10:38 +08:00
parent 4bc34b54a1
commit b830aebdb7
No known key found for this signature in database
GPG Key ID: EE7DA2A50F0960FB
1 changed files with 4 additions and 0 deletions

View File

@ -8,6 +8,8 @@ import (
) )
func TestBool(t *testing.T) { func TestBool(t *testing.T) {
t.Parallel()
v := NewBool(true) v := NewBool(true)
if !v.IsSet() { if !v.IsSet() {
t.Fatal("NewValue(true) failed") t.Fatal("NewValue(true) failed")
@ -119,6 +121,8 @@ func TestToogleAfterOverflow(t *testing.T) {
} }
func TestRace(t *testing.T) { func TestRace(t *testing.T) {
t.Parallel()
repeat := 10000 repeat := 10000
var wg sync.WaitGroup var wg sync.WaitGroup
wg.Add(repeat * 4) wg.Add(repeat * 4)