mirror of
https://github.com/refraction-networking/uquic.git
synced 2025-04-03 04:07:35 +03:00
implement the Transport
This commit is contained in:
parent
ae5a8bd35c
commit
8189e75be6
31 changed files with 1309 additions and 1250 deletions
|
@ -1,8 +1,11 @@
|
|||
package quic
|
||||
|
||||
import (
|
||||
"bytes"
|
||||
"io"
|
||||
"log"
|
||||
"runtime/pprof"
|
||||
"strings"
|
||||
"sync"
|
||||
"testing"
|
||||
|
||||
|
@ -29,6 +32,20 @@ var _ = BeforeSuite(func() {
|
|||
log.SetOutput(io.Discard)
|
||||
})
|
||||
|
||||
func areServersRunning() bool {
|
||||
var b bytes.Buffer
|
||||
pprof.Lookup("goroutine").WriteTo(&b, 1)
|
||||
return strings.Contains(b.String(), "quic-go.(*baseServer).run")
|
||||
}
|
||||
|
||||
func areTransportsRunning() bool {
|
||||
var b bytes.Buffer
|
||||
pprof.Lookup("goroutine").WriteTo(&b, 1)
|
||||
return strings.Contains(b.String(), "quic-go.(*Transport).listen")
|
||||
}
|
||||
|
||||
var _ = AfterEach(func() {
|
||||
mockCtrl.Finish()
|
||||
Eventually(areServersRunning).Should(BeFalse())
|
||||
Eventually(areTransportsRunning()).Should(BeFalse())
|
||||
})
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue