Skip to content

Commit

Permalink
test: check for too big option.PipelineMultiplex value (#436)
Browse files Browse the repository at this point in the history
  • Loading branch information
rueian committed Dec 29, 2023
1 parent 07e32e7 commit 06f2f2e
Showing 1 changed file with 10 additions and 0 deletions.
10 changes: 10 additions & 0 deletions rueidis_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -315,6 +315,16 @@ func TestTLSClient(t *testing.T) {
<-done
}

func TestNewClientMaxMultiplex(t *testing.T) {
_, err := NewClient(ClientOption{
InitAddress: []string{"127.0.0.1:6379"},
PipelineMultiplex: MaxPipelineMultiplex + 1,
})
if err != ErrWrongPipelineMultiplex {
t.Fatalf("unexpected error %v", err)
}
}

func TestSingleClientMultiplex(t *testing.T) {
defer ShouldNotLeaked(SetupLeakDetection())
option := ClientOption{}
Expand Down

0 comments on commit 06f2f2e

Please sign in to comment.