Skip to content

Commit

Permalink
Merge pull request #97 from ohkinozomu/fix-ci
Browse files Browse the repository at this point in the history
Fix CI
  • Loading branch information
wind-c authored Jul 27, 2024
2 parents ae18bfb + 6b8a275 commit 9c7e011
Showing 1 changed file with 8 additions and 3 deletions.
11 changes: 8 additions & 3 deletions cmd/single/main_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -2,20 +2,25 @@ package main

import (
"context"
"go.uber.org/goleak"
"sync"
"testing"
"time"

"go.uber.org/goleak"
)

func TestMain(m *testing.M) {
goleak.VerifyTestMain(m)
goleak.VerifyTestMain(m,
goleak.IgnoreTopFunction("github.com/golang/glog.(*fileSink).flushDaemon"),
)
}

// TestLeaks tests that there are no goroutine leaks after starting and stopping the server.
// We should likely do some more operations here, but this is a start.
func TestLeaks(t *testing.T) {
defer goleak.VerifyNone(t)
defer goleak.VerifyNone(t,
goleak.IgnoreTopFunction("github.com/golang/glog.(*fileSink).flushDaemon"),
)
ctx, cancel := context.WithTimeout(context.Background(), time.Second*5)
defer cancel()
wg := sync.WaitGroup{}
Expand Down

0 comments on commit 9c7e011

Please sign in to comment.