@@ -48,7 +48,7 @@ type Member struct {
48
48
Val uint
49
49
}
50
50
51
- var contextDoneErrRegexp = regexp .MustCompile (`^context is done \(request ID [0-9]+\)$` )
51
+ var contextDoneErrRegexp = regexp .MustCompile (`^context is done \(request ID [0-9]+\):.+ $` )
52
52
53
53
func (m * Member ) EncodeMsgpack (e * msgpack.Encoder ) error {
54
54
if err := e .EncodeArrayLen (2 ); err != nil {
@@ -89,8 +89,8 @@ var indexNo = uint32(0)
89
89
var indexName = "primary"
90
90
var opts = Opts {
91
91
Timeout : 5 * time .Second ,
92
- //Concurrency: 32,
93
- //RateLimit: 4*1024,
92
+ // Concurrency: 32,
93
+ // RateLimit: 4*1024,
94
94
}
95
95
96
96
const N = 500
@@ -727,7 +727,7 @@ func (req *mockRequest) Ctx() context.Context {
727
727
}
728
728
729
729
func (req * mockRequest ) Response (header Header ,
730
- body io.Reader ) (Response , error ) {
730
+ body io.Reader ) (Response , error ) {
731
731
return nil , fmt .Errorf ("some error" )
732
732
}
733
733
@@ -888,7 +888,7 @@ func TestFutureMultipleGetTypedWithError(t *testing.T) {
888
888
}
889
889
}
890
890
891
- ///////////////////
891
+ // /////////////////
892
892
893
893
func TestClient (t * testing.T ) {
894
894
var err error
@@ -1286,7 +1286,7 @@ func TestClientSessionPush(t *testing.T) {
1286
1286
1287
1287
const (
1288
1288
createTableQuery = "CREATE TABLE SQL_SPACE (ID STRING PRIMARY KEY, NAME " +
1289
- "STRING COLLATE \" unicode\" DEFAULT NULL);"
1289
+ "STRING COLLATE \" unicode\" DEFAULT NULL);"
1290
1290
insertQuery = "INSERT INTO SQL_SPACE VALUES (?, ?);"
1291
1291
selectNamedQuery = "SELECT ID, NAME FROM SQL_SPACE WHERE ID=:ID AND NAME=:NAME;"
1292
1292
selectPosQuery = "SELECT ID, NAME FROM SQL_SPACE WHERE ID=? AND NAME=?;"
@@ -1568,9 +1568,9 @@ func TestSQLBindings(t *testing.T) {
1568
1568
metaData , err := exResp .MetaData ()
1569
1569
assert .NoError (t , err , "Error while getting MetaData" )
1570
1570
if metaData [0 ].FieldType != "unsigned" ||
1571
- metaData [0 ].FieldName != "NAME0" ||
1572
- metaData [1 ].FieldType != "string" ||
1573
- metaData [1 ].FieldName != "NAME1" {
1571
+ metaData [0 ].FieldName != "NAME0" ||
1572
+ metaData [1 ].FieldType != "string" ||
1573
+ metaData [1 ].FieldName != "NAME1" {
1574
1574
t .Error ("Wrong metadata" )
1575
1575
}
1576
1576
}
@@ -1595,9 +1595,9 @@ func TestSQLBindings(t *testing.T) {
1595
1595
metaData , err := exResp .MetaData ()
1596
1596
assert .NoError (t , err , "Error while getting MetaData" )
1597
1597
if metaData [0 ].FieldType != "unsigned" ||
1598
- metaData [0 ].FieldName != "NAME0" ||
1599
- metaData [1 ].FieldType != "string" ||
1600
- metaData [1 ].FieldName != "NAME1" {
1598
+ metaData [0 ].FieldName != "NAME0" ||
1599
+ metaData [1 ].FieldType != "string" ||
1600
+ metaData [1 ].FieldName != "NAME1" {
1601
1601
t .Error ("Wrong metadata" )
1602
1602
}
1603
1603
@@ -1621,9 +1621,9 @@ func TestSQLBindings(t *testing.T) {
1621
1621
metaData , err = exResp .MetaData ()
1622
1622
assert .NoError (t , err , "Error while getting MetaData" )
1623
1623
if metaData [0 ].FieldType != "unsigned" ||
1624
- metaData [0 ].FieldName != "NAME0" ||
1625
- metaData [1 ].FieldType != "string" ||
1626
- metaData [1 ].FieldName != "NAME1" {
1624
+ metaData [0 ].FieldName != "NAME0" ||
1625
+ metaData [1 ].FieldType != "string" ||
1626
+ metaData [1 ].FieldName != "NAME1" {
1627
1627
t .Error ("Wrong metadata" )
1628
1628
}
1629
1629
}
@@ -1792,9 +1792,9 @@ func TestNewPrepared(t *testing.T) {
1792
1792
metaData , err := prepResp .MetaData ()
1793
1793
assert .NoError (t , err , "Error while getting MetaData" )
1794
1794
if metaData [0 ].FieldType != "unsigned" ||
1795
- metaData [0 ].FieldName != "NAME0" ||
1796
- metaData [1 ].FieldType != "string" ||
1797
- metaData [1 ].FieldName != "NAME1" {
1795
+ metaData [0 ].FieldName != "NAME0" ||
1796
+ metaData [1 ].FieldType != "string" ||
1797
+ metaData [1 ].FieldName != "NAME1" {
1798
1798
t .Error ("Wrong metadata" )
1799
1799
}
1800
1800
@@ -1838,7 +1838,7 @@ func TestNewPrepared(t *testing.T) {
1838
1838
1839
1839
func TestConnection_DoWithStrangerConn (t * testing.T ) {
1840
1840
expectedErr := fmt .Errorf ("the passed connected request doesn't belong to the current" +
1841
- " connection or connection pool" )
1841
+ " connection or connection pool" )
1842
1842
1843
1843
conn1 := & Connection {}
1844
1844
req := test_helpers .NewMockRequest ()
@@ -2054,7 +2054,7 @@ func TestSchema(t *testing.T) {
2054
2054
t .Errorf ("index field has incorrect Id" )
2055
2055
}
2056
2056
if (ifield1 .Type != "num" && ifield1 .Type != "unsigned" ) ||
2057
- (ifield2 .Type != "STR" && ifield2 .Type != "string" ) {
2057
+ (ifield2 .Type != "STR" && ifield2 .Type != "string" ) {
2058
2058
t .Errorf ("index field has incorrect Type '%s'" , ifield2 .Type )
2059
2059
}
2060
2060
}
@@ -2506,7 +2506,7 @@ func testConnectionDoSelectRequestPrepare(t *testing.T, conn Connector) {
2506
2506
}
2507
2507
2508
2508
func testConnectionDoSelectRequestCheck (t * testing.T ,
2509
- resp * SelectResponse , err error , pos bool , dataLen int , firstKey uint64 ) {
2509
+ resp * SelectResponse , err error , pos bool , dataLen int , firstKey uint64 ) {
2510
2510
t .Helper ()
2511
2511
2512
2512
if err != nil {
@@ -2716,7 +2716,7 @@ func TestCallRequest(t *testing.T) {
2716
2716
func TestClientRequestObjectsWithNilContext (t * testing.T ) {
2717
2717
conn := test_helpers .ConnectWithValidation (t , dialer , opts )
2718
2718
defer conn .Close ()
2719
- req := NewPingRequest ().Context (nil ) //nolint
2719
+ req := NewPingRequest ().Context (nil ) // nolint
2720
2720
data , err := conn .Do (req ).Get ()
2721
2721
if err != nil {
2722
2722
t .Fatalf ("Failed to Ping: %s" , err )
@@ -2834,8 +2834,8 @@ func TestComplexStructs(t *testing.T) {
2834
2834
}
2835
2835
2836
2836
if tuple .Cid != tuples [0 ].Cid ||
2837
- len (tuple .Members ) != len (tuples [0 ].Members ) ||
2838
- tuple .Members [1 ].Name != tuples [0 ].Members [1 ].Name {
2837
+ len (tuple .Members ) != len (tuples [0 ].Members ) ||
2838
+ tuple .Members [1 ].Name != tuples [0 ].Members [1 ].Name {
2839
2839
t .Errorf ("Failed to selectTyped: incorrect data" )
2840
2840
return
2841
2841
}
@@ -3146,7 +3146,7 @@ func TestStream_TxnIsolationLevel(t *testing.T) {
3146
3146
3147
3147
func TestStream_DoWithStrangerConn (t * testing.T ) {
3148
3148
expectedErr := fmt .Errorf ("the passed connected request " +
3149
- "doesn't belong to the current connection or connection pool" )
3149
+ "doesn't belong to the current connection or connection pool" )
3150
3150
3151
3151
conn := & Connection {}
3152
3152
stream , _ := conn .NewStream ()
@@ -3269,7 +3269,7 @@ func TestClientIdRequestObjectWithNilContext(t *testing.T) {
3269
3269
req := NewIdRequest (ProtocolInfo {
3270
3270
Version : ProtocolVersion (1 ),
3271
3271
Features : []iproto.Feature {iproto .IPROTO_FEATURE_STREAMS },
3272
- }).Context (nil ) //nolint
3272
+ }).Context (nil ) // nolint
3273
3273
data , err := conn .Do (req ).Get ()
3274
3274
require .Nilf (t , err , "No errors on Id request execution" )
3275
3275
require .NotNilf (t , data , "Response data not empty" )
@@ -3293,7 +3293,7 @@ func TestClientIdRequestObjectWithPassedCanceledContext(t *testing.T) {
3293
3293
req := NewIdRequest (ProtocolInfo {
3294
3294
Version : ProtocolVersion (1 ),
3295
3295
Features : []iproto.Feature {iproto .IPROTO_FEATURE_STREAMS },
3296
- }).Context (ctx ) //nolint
3296
+ }).Context (ctx ) // nolint
3297
3297
cancel ()
3298
3298
resp , err := conn .Do (req ).Get ()
3299
3299
require .Nilf (t , resp , "Response is empty" )
@@ -3395,7 +3395,7 @@ func TestConnectionProtocolFeatureRequirementFail(t *testing.T) {
3395
3395
require .NotNilf (t , err , "Got error on connect" )
3396
3396
require .Contains (t , err .Error (),
3397
3397
"invalid server protocol: protocol feature " +
3398
- "IPROTO_FEATURE_TRANSACTIONS is not supported" )
3398
+ "IPROTO_FEATURE_TRANSACTIONS is not supported" )
3399
3399
}
3400
3400
3401
3401
func TestConnectionProtocolFeatureRequirementManyFail (t * testing.T ) {
@@ -3416,7 +3416,7 @@ func TestConnectionProtocolFeatureRequirementManyFail(t *testing.T) {
3416
3416
require .Contains (t ,
3417
3417
err .Error (),
3418
3418
"invalid server protocol: protocol features IPROTO_FEATURE_TRANSACTIONS, " +
3419
- "Feature(15532) are not supported" )
3419
+ "Feature(15532) are not supported" )
3420
3420
}
3421
3421
3422
3422
func TestErrorExtendedInfoBasic (t * testing.T ) {
@@ -3629,7 +3629,7 @@ func TestConnection_NewWatcher_noWatchersFeature(t *testing.T) {
3629
3629
require .Nilf (t , watcher , "watcher must not be created" )
3630
3630
require .NotNilf (t , err , "an error is expected" )
3631
3631
expected := "the feature IPROTO_FEATURE_WATCHERS must be supported by " +
3632
- "connection to create a watcher"
3632
+ "connection to create a watcher"
3633
3633
require .Equal (t , expected , err .Error ())
3634
3634
}
3635
3635
0 commit comments