@@ -1264,6 +1264,7 @@ func fill(ctx context.Context, db ydb.Connection, folder string) error {
12641264 ))
12651265 return
12661266 },
1267+ table .WithIdempotent (),
12671268 )
12681269}
12691270
@@ -1302,6 +1303,7 @@ func createTables(ctx context.Context, c table.Client, folder string) error {
13021303 options .WithPrimaryKeyColumn ("series_id" , "season_id" ),
13031304 )
13041305 },
1306+ table .WithIdempotent (),
13051307 )
13061308 if err != nil {
13071309 return err
@@ -1322,6 +1324,7 @@ func createTables(ctx context.Context, c table.Client, folder string) error {
13221324 options .WithPrimaryKeyColumn ("series_id" , "season_id" , "episode_id" ),
13231325 )
13241326 },
1327+ table .WithIdempotent (),
13251328 )
13261329 return err
13271330}
@@ -1399,6 +1402,7 @@ func TestLongStream(t *testing.T) {
13991402 `CREATE TABLE ` + tableName + ` (val Int64, PRIMARY KEY (val))` ,
14001403 )
14011404 },
1405+ table .WithIdempotent (),
14021406 ); err != nil {
14031407 t .Fatalf ("create table failed: %v\n " , err )
14041408 }
@@ -1454,6 +1458,7 @@ func TestLongStream(t *testing.T) {
14541458 )
14551459 return err
14561460 },
1461+ table .WithIdempotent (),
14571462 ); err != nil {
14581463 t .Fatalf ("upsert failed: %v\n " , err )
14591464 } else {
@@ -1517,6 +1522,7 @@ func TestLongStream(t *testing.T) {
15171522 }
15181523 return nil
15191524 },
1525+ table .WithIdempotent (),
15201526 ); err != nil {
15211527 t .Fatalf ("stream query failed: %v\n " , err )
15221528 }
@@ -1557,6 +1563,7 @@ func TestLongStream(t *testing.T) {
15571563 }
15581564 return nil
15591565 },
1566+ table .WithIdempotent (),
15601567 ); err != nil {
15611568 t .Fatalf ("stream query failed: %v\n " , err )
15621569 }
@@ -1611,6 +1618,7 @@ func TestSplitRangesAndRead(t *testing.T) {
16111618 )` ,
16121619 )
16131620 },
1621+ table .WithIdempotent (),
16141622 ); err != nil {
16151623 t .Fatalf ("create table failed: %v\n " , err )
16161624 }
@@ -1666,6 +1674,7 @@ func TestSplitRangesAndRead(t *testing.T) {
16661674 )
16671675 return err
16681676 },
1677+ table .WithIdempotent (),
16691678 ); err != nil {
16701679 t .Fatalf ("upsert failed: %v\n " , err )
16711680 } else {
@@ -1724,6 +1733,7 @@ func TestSplitRangesAndRead(t *testing.T) {
17241733 }
17251734 return nil
17261735 },
1736+ table .WithIdempotent (),
17271737 ); err != nil {
17281738 t .Fatalf ("stream query failed: %v\n " , err )
17291739 }
@@ -1757,6 +1767,7 @@ func TestSplitRangesAndRead(t *testing.T) {
17571767 }
17581768 return nil
17591769 },
1770+ table .WithIdempotent (),
17601771 ); err != nil {
17611772 t .Fatalf ("stream query failed: %v\n " , err )
17621773 }
@@ -1788,14 +1799,18 @@ func TestIssue229UnexpectedNullWhileParseNilJsonDocumentValue(t *testing.T) {
17881799 defer db .Close (ctx )
17891800 err := db .Table ().DoTx (ctx , func (ctx context.Context , tx table.TransactionActor ) error {
17901801 res , err := tx .Execute (ctx , `SELECT Nothing(JsonDocument?) AS r` , nil )
1791- require .NoError (t , err )
1792- require .NoError (t , res .NextResultSetErr (ctx ))
1802+ if err != nil {
1803+ return err
1804+ }
1805+ if err = res .NextResultSetErr (ctx ); err != nil {
1806+ return err
1807+ }
17931808 require .True (t , res .NextRow ())
17941809
17951810 var val issue229Struct
17961811 require .NoError (t , res .Scan (& val ))
1797- return nil
1798- })
1812+ return res . Err ()
1813+ }, table . WithIdempotent () )
17991814 require .NoError (t , err )
18001815}
18011816
@@ -1822,8 +1837,12 @@ func TestIssue259IntervalFromDuration(t *testing.T) {
18221837 SELECT $ts == $ten_micro, $ten_micro;` , table .NewQueryParameters (
18231838 table .ValueParam (`$ts` , types .IntervalValueFromDuration (10 * time .Microsecond )),
18241839 ))
1825- require .NoError (t , err )
1826- require .NoError (t , res .NextResultSetErr (ctx ))
1840+ if err != nil {
1841+ return err
1842+ }
1843+ if err = res .NextResultSetErr (ctx ); err != nil {
1844+ return err
1845+ }
18271846 require .True (t , res .NextRow ())
18281847
18291848 var (
@@ -1950,7 +1969,7 @@ func TestNullType(t *testing.T) {
19501969 }
19511970 fmt .Printf ("%+v\n " , rescheduleDue )
19521971 return res .Err ()
1953- }, table .WithTxSettings (table .TxSettings (table .WithSnapshotReadOnly ())))
1972+ }, table .WithTxSettings (table .TxSettings (table .WithSnapshotReadOnly ())), table . WithIdempotent () )
19541973 require .NoError (t , err )
19551974}
19561975
@@ -2193,7 +2212,7 @@ func TestValueToYqlLiteral(t *testing.T) {
21932212 require .Equal (t , 1 , len (values ))
21942213 require .Equal (t , tt .Yql (), values [0 ].Yql (), fmt .Sprintf ("%T vs %T" , tt , values [0 ]))
21952214 return nil
2196- })
2215+ }, table . WithIdempotent () )
21972216 require .NoError (t , err )
21982217 })
21992218 }
0 commit comments