@@ -17,7 +17,6 @@ import (
1717 "github.com/ydb-platform/ydb-go-sdk/v3/table"
1818 "github.com/ydb-platform/ydb-go-sdk/v3/table/options"
1919 "github.com/ydb-platform/ydb-go-sdk/v3/testutil"
20- "github.com/ydb-platform/ydb-go-sdk/v3/trace"
2120)
2221
2322func TestRetryerBackoffRetryCancelation (t * testing.T ) {
@@ -212,7 +211,6 @@ func TestRetryerImmediateReturn(t *testing.T) {
212211// We are testing all suspentions of custom operation func against to all deadline
213212// timeouts - all sub-tests must have latency less than timeouts (+tolerance)
214213func TestRetryContextDeadline (t * testing.T ) {
215- tolerance := 10 * time .Millisecond
216214 timeouts := []time.Duration {
217215 50 * time .Millisecond ,
218216 100 * time .Millisecond ,
@@ -318,31 +316,8 @@ func TestRetryContextDeadline(t *testing.T) {
318316 t .Run (fmt .Sprintf ("Timeout=%v,Sleep=%v" , timeout , sleep ), func (t * testing.T ) {
319317 ctx , cancel := context .WithTimeout (context .Background (), timeout )
320318 defer cancel ()
321- start := time .Now ()
322319 _ = do (
323- trace .WithRetry (
324- ctx ,
325- trace.Retry {
326- OnRetry : func (
327- info trace.RetryLoopStartInfo ,
328- ) func (
329- intermediateInfo trace.RetryLoopIntermediateInfo ,
330- ) func (
331- trace.RetryLoopDoneInfo ,
332- ) {
333- return func (
334- info trace.RetryLoopIntermediateInfo ,
335- ) func (trace.RetryLoopDoneInfo ) {
336- return func (info trace.RetryLoopDoneInfo ) {
337- latency := time .Since (start )
338- if latency - timeouts [i ] > tolerance {
339- t .Errorf ("unexpected latency: %v" , latency )
340- }
341- }
342- }
343- },
344- },
345- ),
320+ ctx ,
346321 p ,
347322 func (ctx context.Context , _ table.Session ) error {
348323 select {
0 commit comments