Skip to content

Commit

Permalink
Remove Listen Call
Browse files Browse the repository at this point in the history
Signed-off-by: Mahad Zaryab <mahadzaryab1@gmail.com>
  • Loading branch information
mahadzaryab1 committed Nov 12, 2024
1 parent e3101ca commit 111414f
Showing 1 changed file with 1 addition and 14 deletions.
15 changes: 1 addition & 14 deletions plugin/storage/grpc/factory_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -6,8 +6,6 @@ package grpc
import (
"context"
"errors"
"log"
"net"
"testing"
"time"

Expand Down Expand Up @@ -154,20 +152,9 @@ func TestInitFactory(t *testing.T) {
}

func TestGRPCStorageFactoryWithConfig(t *testing.T) {
lis, err := net.Listen("tcp", ":0")
require.NoError(t, err, "failed to listen")

s := grpc.NewServer()
go func() {
if err := s.Serve(lis); err != nil {
log.Fatalf("Server exited with error: %v", err)
}
}()
defer s.Stop()

cfg := Config{
ClientConfig: configgrpc.ClientConfig{
Endpoint: lis.Addr().String(),
Endpoint: "test",
},
TimeoutConfig: exporterhelper.TimeoutConfig{
Timeout: 1 * time.Second,
Expand Down

0 comments on commit 111414f

Please sign in to comment.