Skip to content

Commit

Permalink
remove failing test
Browse files Browse the repository at this point in the history
  • Loading branch information
gerardsn committed Nov 23, 2023
1 parent db4b148 commit 97d47f4
Showing 1 changed file with 0 additions and 27 deletions.
27 changes: 0 additions & 27 deletions network/transport/grpc/connection_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -20,11 +20,8 @@ package grpc

import (
"context"
"github.com/nuts-foundation/nuts-node/test"
"github.com/stretchr/testify/require"
"google.golang.org/grpc/codes"
"sync"
"sync/atomic"
"testing"
"time"

Expand Down Expand Up @@ -104,30 +101,6 @@ func Test_conn_registerStream(t *testing.T) {
})
}

func Test_conn_startSending(t *testing.T) {
t.Run("disconnect does not panic", func(t *testing.T) {
connection := createConnection(context.Background(), transport.Peer{}).(*conn)
stream := newServerStream("foo", "", nil)

defer stream.cancelFunc()

p := &TestProtocol{}
_ = connection.registerStream(p, stream)

assert.Equal(t, int32(2), connection.activeGoroutines) // startSending and startReceiving

stream.cancelFunc()
connection.disconnect()

test.WaitFor(t, func() (bool, error) {
return atomic.LoadInt32(&connection.activeGoroutines) == 0, nil
}, 5*time.Second, "waiting for all goroutines to exit")

// Last received message is dropped and no status is set. Default value is OK.
assert.Equal(t, codes.OK, connection.status.Load().Code())
})
}

func TestConn_Send(t *testing.T) {
t.Run("buffer overflow softlimit", func(t *testing.T) {
connection := createConnection(context.Background(), transport.Peer{}).(*conn)
Expand Down

0 comments on commit 97d47f4

Please sign in to comment.