Skip to content

Commit

Permalink
pool/aio: Replace panics with test assertion calls
Browse files Browse the repository at this point in the history
Definite misuse of panics.

Signed-off-by: Leonard Lyubich <[email protected]>
  • Loading branch information
cthulhu-rider committed Dec 10, 2024
1 parent 868c0dc commit 3b910ce
Showing 1 changed file with 3 additions and 6 deletions.
9 changes: 3 additions & 6 deletions pool/pool_aio_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -494,19 +494,16 @@ func testClientWaiterWithAIO(t *testing.T, nodeAddr string) {
var prmInit client.PrmInit

cl, err := client.New(prmInit)
if err != nil {
panic(fmt.Errorf("new client: %w", err))
}
require.NoError(t, err)

// connect to NeoFS gateway
var prmDial client.PrmDial
prmDial.SetServerURI(nodeAddr) // endpoint address
prmDial.SetTimeout(15 * time.Second)
prmDial.SetStreamTimeout(15 * time.Second)

if err = cl.Dial(prmDial); err != nil {
panic(fmt.Errorf("dial %v", err))
}
err = cl.Dial(prmDial)
require.NoError(t, err)

wait := waiter.NewWaiter(cl, time.Second)

Expand Down

0 comments on commit 3b910ce

Please sign in to comment.