Skip to content

Commit

Permalink
Rename fake proto
Browse files Browse the repository at this point in the history
  • Loading branch information
MarcoPolo committed Jun 7, 2023
1 parent bf74725 commit 49006a7
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions p2p/test/transport/deadline_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -54,13 +54,13 @@ func TestReadWriteDeadlines(t *testing.T) {
}))

// This simply stalls
listener.SetStreamHandler("/stall/1", func(s network.Stream) {
listener.SetStreamHandler("/stall", func(s network.Stream) {
time.Sleep(60 * time.Second)
s.Close()
})

t.Run("ReadDeadline", func(t *testing.T) {
s, err := dialer.NewStream(context.Background(), listener.ID(), "/stall/1")
s, err := dialer.NewStream(context.Background(), listener.ID(), "/stall")
require.NoError(t, err)
defer s.Close()

Expand All @@ -80,7 +80,7 @@ func TestReadWriteDeadlines(t *testing.T) {
})

t.Run("WriteDeadline", func(t *testing.T) {
s, err := dialer.NewStream(context.Background(), listener.ID(), "/stall/1")
s, err := dialer.NewStream(context.Background(), listener.ID(), "/stall")
require.NoError(t, err)
defer s.Close()

Expand All @@ -101,7 +101,7 @@ func TestReadWriteDeadlines(t *testing.T) {
t.Run("Deadline for", func(t *testing.T) {
for _, op := range []string{"Read", "Write"} {
t.Run(op, func(t *testing.T) {
s, err := dialer.NewStream(context.Background(), listener.ID(), "/stall/1")
s, err := dialer.NewStream(context.Background(), listener.ID(), "/stall")
require.NoError(t, err)
defer s.Close()

Expand Down

0 comments on commit 49006a7

Please sign in to comment.