Skip to content

Commit

Permalink
fix golint errors
Browse files Browse the repository at this point in the history
  • Loading branch information
DoubleDi committed Mar 7, 2020
1 parent a37c011 commit 6256027
Showing 1 changed file with 3 additions and 4 deletions.
7 changes: 3 additions & 4 deletions conn_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -178,8 +178,7 @@ func (s *connSuite) TestServerError() {

func (s *connSuite) TestServerKillQuery() {
queryID := uuid.NewV4().String()
ctx := context.WithValue(context.Background(), queryIDParamName, queryID)
_, err := s.connWithKillQuery.QueryContext(ctx, "SELECT sleep(2)")
_, err := s.connWithKillQuery.QueryContext(context.Background(), "SELECT sleep(2)")
s.Error(err)
s.Contains(err.Error(), "net/http: timeout awaiting response headers")
rows := s.connWithKillQuery.QueryRow(fmt.Sprintf("SELECT count(query_id) FROM system.processes where query_id='%s'", queryID))
Expand All @@ -188,10 +187,10 @@ func (s *connSuite) TestServerKillQuery() {
s.NoError(err)
s.Equal(0, amount)

_, err = s.connWithKillQuery.QueryContext(ctx, "SELECT sleep(0.5)")
_, err = s.connWithKillQuery.QueryContext(context.Background(), "SELECT sleep(0.5)")
s.NoError(err)

_, err = s.conn.QueryContext(ctx, "SELECT sleep(2)")
_, err = s.conn.QueryContext(context.Background(), "SELECT sleep(2)")
s.NoError(err)
}

Expand Down

0 comments on commit 6256027

Please sign in to comment.