micro/sync/waitgroup_test.go

17 lines
237 B
Go
Raw Normal View History

package sync
import (
"context"
"testing"
"time"
)
func TestWaitGroup(t *testing.T) {
wg := NewWaitGroup()
_ = t
wg.Add(1)
ctx, cancel := context.WithTimeout(context.TODO(), 1*time.Second)
defer cancel()
wg.WaitContext(ctx)
}