mirror of
https://github.com/libp2p/go-libp2p-resource-manager.git
synced 2025-02-10 20:00:57 +08:00
17 lines
405 B
Go
17 lines
405 B
Go
|
package obs_test
|
||
|
|
||
|
import (
|
||
|
"testing"
|
||
|
|
||
|
rcmgr "github.com/libp2p/go-libp2p-resource-manager"
|
||
|
"github.com/libp2p/go-libp2p-resource-manager/obs"
|
||
|
)
|
||
|
|
||
|
func TestTraceReporterStartAndClose(t *testing.T) {
|
||
|
rcmgr, err := rcmgr.NewResourceManager(rcmgr.NewFixedLimiter(rcmgr.DefaultLimits.AutoScale()), rcmgr.WithTraceReporter(obs.StatsTraceReporter{}))
|
||
|
if err != nil {
|
||
|
t.Fatal(err)
|
||
|
}
|
||
|
defer rcmgr.Close()
|
||
|
}
|