Skip to content

Commit

Permalink
fix: datastream client test timeouts (#1552)
Browse files Browse the repository at this point in the history
  • Loading branch information
V-Staykov authored Dec 12, 2024
1 parent cb5f06a commit 6239b09
Showing 1 changed file with 18 additions and 18 deletions.
36 changes: 18 additions & 18 deletions zk/datastream/client/stream_client_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -50,13 +50,13 @@ func TestStreamClientReadHeaderEntry(t *testing.T) {
}

for _, testCase := range testCases {
c := NewClient(context.Background(), "", false, 0, 500*time.Millisecond, 0)
server, conn := net.Pipe()
defer server.Close()
defer c.Stop()

c.conn = conn
t.Run(testCase.name, func(t *testing.T) {
c := NewClient(context.Background(), "", false, 0, 500*time.Millisecond, 0)
server, conn := net.Pipe()
defer server.Close()
defer c.Stop()

c.conn = conn
go func() {
server.Write(testCase.input)
server.Close()
Expand Down Expand Up @@ -118,13 +118,13 @@ func TestStreamClientReadResultEntry(t *testing.T) {
}

for _, testCase := range testCases {
c := NewClient(context.Background(), "", false, 0, 500*time.Millisecond, 0)
server, conn := net.Pipe()
defer server.Close()
defer c.Stop()

c.conn = conn
t.Run(testCase.name, func(t *testing.T) {
c := NewClient(context.Background(), "", false, 0, 500*time.Millisecond, 0)
server, conn := net.Pipe()
defer server.Close()
defer c.Stop()

c.conn = conn
go func() {
server.Write(testCase.input)
server.Close()
Expand Down Expand Up @@ -191,13 +191,13 @@ func TestStreamClientReadFileEntry(t *testing.T) {
},
}
for _, testCase := range testCases {
c := NewClient(context.Background(), "", false, 0, 500*time.Millisecond, 0)
server, conn := net.Pipe()
defer c.Stop()
defer server.Close()

c.conn = conn
t.Run(testCase.name, func(t *testing.T) {
c := NewClient(context.Background(), "", false, 0, 500*time.Millisecond, 0)
server, conn := net.Pipe()
defer c.Stop()
defer server.Close()

c.conn = conn
go func() {
server.Write(testCase.input)
server.Close()
Expand Down

0 comments on commit 6239b09

Please sign in to comment.