Skip to content

Commit 98f0612

Browse files
authored
Fix flaky-test TestDoCreateSessionError (#1920)
1 parent 58504af commit 98f0612

File tree

1 file changed

+4
-4
lines changed

1 file changed

+4
-4
lines changed

internal/table/retry_test.go

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -155,10 +155,10 @@ func TestDoCreateSessionError(t *testing.T) {
155155
},
156156
nil,
157157
)
158-
if !xerrors.Is(err, context.DeadlineExceeded) {
159-
t.Errorf("unexpected error: %v", err)
160-
}
161-
if !xerrors.IsOperationError(err, Ydb.StatusIds_UNAVAILABLE) {
158+
switch {
159+
case xerrors.Is(err, context.DeadlineExceeded):
160+
case xerrors.IsOperationError(err, Ydb.StatusIds_UNAVAILABLE):
161+
default:
162162
t.Errorf("unexpected error: %v", err)
163163
}
164164
})

0 commit comments

Comments
 (0)