2
0
mirror of https://github.com/status-im/go-waku.git synced 2025-02-20 17:18:20 +00:00

23 lines
393 B
Go
Raw Normal View History

2021-10-18 14:43:17 +02:00
package metrics
import (
"context"
"testing"
"time"
"github.com/stretchr/testify/require"
"github.com/waku-org/go-waku/waku/v2/utils"
2021-10-18 14:43:17 +02:00
)
func TestStartAndStopMetricsServer(t *testing.T) {
server := NewMetricsServer("0.0.0.0", 9876, utils.Logger())
2021-10-18 14:43:17 +02:00
go func() {
time.Sleep(1 * time.Second)
err := server.Stop(context.Background())
require.NoError(t, err)
}()
server.Start()
}