@@ -48,7 +48,7 @@ type Member struct {
4848 Val uint
4949}
5050
51- var contextDoneErrRegexp = regexp .MustCompile (`^context is done \(request ID [0-9]+\)$` )
51+ var contextDoneErrRegexp = regexp .MustCompile (`^context is done \(request ID [0-9]+\):.+ $` )
5252
5353func (m * Member ) EncodeMsgpack (e * msgpack.Encoder ) error {
5454 if err := e .EncodeArrayLen (2 ); err != nil {
@@ -89,8 +89,8 @@ var indexNo = uint32(0)
8989var indexName = "primary"
9090var opts = Opts {
9191 Timeout : 5 * time .Second ,
92- //Concurrency: 32,
93- //RateLimit: 4*1024,
92+ // Concurrency: 32,
93+ // RateLimit: 4*1024,
9494}
9595
9696const N = 500
@@ -727,7 +727,7 @@ func (req *mockRequest) Ctx() context.Context {
727727}
728728
729729func (req * mockRequest ) Response (header Header ,
730- body io.Reader ) (Response , error ) {
730+ body io.Reader ) (Response , error ) {
731731 return nil , fmt .Errorf ("some error" )
732732}
733733
@@ -888,7 +888,7 @@ func TestFutureMultipleGetTypedWithError(t *testing.T) {
888888 }
889889}
890890
891- ///////////////////
891+ // /////////////////
892892
893893func TestClient (t * testing.T ) {
894894 var err error
@@ -1286,7 +1286,7 @@ func TestClientSessionPush(t *testing.T) {
12861286
12871287const (
12881288 createTableQuery = "CREATE TABLE SQL_SPACE (ID STRING PRIMARY KEY, NAME " +
1289- "STRING COLLATE \" unicode\" DEFAULT NULL);"
1289+ "STRING COLLATE \" unicode\" DEFAULT NULL);"
12901290 insertQuery = "INSERT INTO SQL_SPACE VALUES (?, ?);"
12911291 selectNamedQuery = "SELECT ID, NAME FROM SQL_SPACE WHERE ID=:ID AND NAME=:NAME;"
12921292 selectPosQuery = "SELECT ID, NAME FROM SQL_SPACE WHERE ID=? AND NAME=?;"
@@ -1568,9 +1568,9 @@ func TestSQLBindings(t *testing.T) {
15681568 metaData , err := exResp .MetaData ()
15691569 assert .NoError (t , err , "Error while getting MetaData" )
15701570 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" {
15741574 t .Error ("Wrong metadata" )
15751575 }
15761576 }
@@ -1595,9 +1595,9 @@ func TestSQLBindings(t *testing.T) {
15951595 metaData , err := exResp .MetaData ()
15961596 assert .NoError (t , err , "Error while getting MetaData" )
15971597 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" {
16011601 t .Error ("Wrong metadata" )
16021602 }
16031603
@@ -1621,9 +1621,9 @@ func TestSQLBindings(t *testing.T) {
16211621 metaData , err = exResp .MetaData ()
16221622 assert .NoError (t , err , "Error while getting MetaData" )
16231623 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" {
16271627 t .Error ("Wrong metadata" )
16281628 }
16291629}
@@ -1792,9 +1792,9 @@ func TestNewPrepared(t *testing.T) {
17921792 metaData , err := prepResp .MetaData ()
17931793 assert .NoError (t , err , "Error while getting MetaData" )
17941794 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" {
17981798 t .Error ("Wrong metadata" )
17991799 }
18001800
@@ -1838,7 +1838,7 @@ func TestNewPrepared(t *testing.T) {
18381838
18391839func TestConnection_DoWithStrangerConn (t * testing.T ) {
18401840 expectedErr := fmt .Errorf ("the passed connected request doesn't belong to the current" +
1841- " connection or connection pool" )
1841+ " connection or connection pool" )
18421842
18431843 conn1 := & Connection {}
18441844 req := test_helpers .NewMockRequest ()
@@ -2054,7 +2054,7 @@ func TestSchema(t *testing.T) {
20542054 t .Errorf ("index field has incorrect Id" )
20552055 }
20562056 if (ifield1 .Type != "num" && ifield1 .Type != "unsigned" ) ||
2057- (ifield2 .Type != "STR" && ifield2 .Type != "string" ) {
2057+ (ifield2 .Type != "STR" && ifield2 .Type != "string" ) {
20582058 t .Errorf ("index field has incorrect Type '%s'" , ifield2 .Type )
20592059 }
20602060}
@@ -2506,7 +2506,7 @@ func testConnectionDoSelectRequestPrepare(t *testing.T, conn Connector) {
25062506}
25072507
25082508func 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 ) {
25102510 t .Helper ()
25112511
25122512 if err != nil {
@@ -2716,7 +2716,7 @@ func TestCallRequest(t *testing.T) {
27162716func TestClientRequestObjectsWithNilContext (t * testing.T ) {
27172717 conn := test_helpers .ConnectWithValidation (t , dialer , opts )
27182718 defer conn .Close ()
2719- req := NewPingRequest ().Context (nil ) //nolint
2719+ req := NewPingRequest ().Context (nil ) // nolint
27202720 data , err := conn .Do (req ).Get ()
27212721 if err != nil {
27222722 t .Fatalf ("Failed to Ping: %s" , err )
@@ -2834,8 +2834,8 @@ func TestComplexStructs(t *testing.T) {
28342834 }
28352835
28362836 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 {
28392839 t .Errorf ("Failed to selectTyped: incorrect data" )
28402840 return
28412841 }
@@ -3146,7 +3146,7 @@ func TestStream_TxnIsolationLevel(t *testing.T) {
31463146
31473147func TestStream_DoWithStrangerConn (t * testing.T ) {
31483148 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" )
31503150
31513151 conn := & Connection {}
31523152 stream , _ := conn .NewStream ()
@@ -3269,7 +3269,7 @@ func TestClientIdRequestObjectWithNilContext(t *testing.T) {
32693269 req := NewIdRequest (ProtocolInfo {
32703270 Version : ProtocolVersion (1 ),
32713271 Features : []iproto.Feature {iproto .IPROTO_FEATURE_STREAMS },
3272- }).Context (nil ) //nolint
3272+ }).Context (nil ) // nolint
32733273 data , err := conn .Do (req ).Get ()
32743274 require .Nilf (t , err , "No errors on Id request execution" )
32753275 require .NotNilf (t , data , "Response data not empty" )
@@ -3293,7 +3293,7 @@ func TestClientIdRequestObjectWithPassedCanceledContext(t *testing.T) {
32933293 req := NewIdRequest (ProtocolInfo {
32943294 Version : ProtocolVersion (1 ),
32953295 Features : []iproto.Feature {iproto .IPROTO_FEATURE_STREAMS },
3296- }).Context (ctx ) //nolint
3296+ }).Context (ctx ) // nolint
32973297 cancel ()
32983298 resp , err := conn .Do (req ).Get ()
32993299 require .Nilf (t , resp , "Response is empty" )
@@ -3395,7 +3395,7 @@ func TestConnectionProtocolFeatureRequirementFail(t *testing.T) {
33953395 require .NotNilf (t , err , "Got error on connect" )
33963396 require .Contains (t , err .Error (),
33973397 "invalid server protocol: protocol feature " +
3398- "IPROTO_FEATURE_TRANSACTIONS is not supported" )
3398+ "IPROTO_FEATURE_TRANSACTIONS is not supported" )
33993399}
34003400
34013401func TestConnectionProtocolFeatureRequirementManyFail (t * testing.T ) {
@@ -3416,7 +3416,7 @@ func TestConnectionProtocolFeatureRequirementManyFail(t *testing.T) {
34163416 require .Contains (t ,
34173417 err .Error (),
34183418 "invalid server protocol: protocol features IPROTO_FEATURE_TRANSACTIONS, " +
3419- "Feature(15532) are not supported" )
3419+ "Feature(15532) are not supported" )
34203420}
34213421
34223422func TestErrorExtendedInfoBasic (t * testing.T ) {
@@ -3629,7 +3629,7 @@ func TestConnection_NewWatcher_noWatchersFeature(t *testing.T) {
36293629 require .Nilf (t , watcher , "watcher must not be created" )
36303630 require .NotNilf (t , err , "an error is expected" )
36313631 expected := "the feature IPROTO_FEATURE_WATCHERS must be supported by " +
3632- "connection to create a watcher"
3632+ "connection to create a watcher"
36333633 require .Equal (t , expected , err .Error ())
36343634}
36353635
0 commit comments