forked from mirror/abool
Enable parallel testing
This commit is contained in:
parent
4bc34b54a1
commit
b830aebdb7
|
@ -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)
|
||||||
|
|
Loading…
Reference in New Issue