@@ -160,7 +160,7 @@ func TestClientBatchRequest_len(t *testing.T) {
160160 s := httptest .NewServer (http .HandlerFunc (func (rw http.ResponseWriter , r * http.Request ) {
161161 _ , err := rw .Write (b )
162162 if err != nil {
163- t .Error ("failed to write reponse :" , err )
163+ t .Error ("failed to write response :" , err )
164164 }
165165 }))
166166 t .Cleanup (s .Close )
@@ -170,7 +170,7 @@ func TestClientBatchRequest_len(t *testing.T) {
170170 t .Fatal ("failed to dial test server:" , err )
171171 }
172172 defer client .Close ()
173-
173+
174174 t .Run ("too-few" , func (t * testing.T ) {
175175 batch := []BatchElem {
176176 {Method : "foo" },
@@ -179,8 +179,7 @@ func TestClientBatchRequest_len(t *testing.T) {
179179 }
180180 ctx , cancelFn := context .WithTimeout (context .Background (), time .Second )
181181 defer cancelFn ()
182- err := client .BatchCallContext (ctx , batch )
183- if ! errors .Is (err , ErrBadResult ) {
182+ if err := client .BatchCallContext (ctx , batch ); ! errors .Is (err , ErrBadResult ) {
184183 t .Errorf ("expected %q but got: %v" , ErrBadResult , err )
185184 }
186185 })
@@ -191,8 +190,7 @@ func TestClientBatchRequest_len(t *testing.T) {
191190 }
192191 ctx , cancelFn := context .WithTimeout (context .Background (), time .Second )
193192 defer cancelFn ()
194- err := client .BatchCallContext (ctx , batch )
195- if ! errors .Is (err , ErrBadResult ) {
193+ if err := client .BatchCallContext (ctx , batch ); ! errors .Is (err , ErrBadResult ) {
196194 t .Errorf ("expected %q but got: %v" , ErrBadResult , err )
197195 }
198196 })
0 commit comments