Skip to content

Commit

Permalink
chore(bigquery): cleanup some lint errors (#6158)
Browse files Browse the repository at this point in the history
* chore(bigquery): cleanup some lint errors

This PR addresses linter/tricorder errors surfaced when importing this
library internally.  See cl/454723109 for examples.
  • Loading branch information
shollyman committed Jun 14, 2022
1 parent 79c47a7 commit 3cb6fe1
Show file tree
Hide file tree
Showing 3 changed files with 5 additions and 6 deletions.
1 change: 1 addition & 0 deletions bigquery/internal/version.go
Expand Up @@ -12,6 +12,7 @@
// See the License for the specific language governing permissions and
// limitations under the License.

// Package internal is used to manage versioning of the released library.
package internal

// Version is the current tagged release of the library.
Expand Down
4 changes: 0 additions & 4 deletions bigquery/storage/managedwriter/integration_test.go
Expand Up @@ -611,10 +611,6 @@ func testSchemaEvolution(ctx context.Context, t *testing.T, mwClient *Client, bq
break
}
curOffset = curOffset + 1
if err != nil {
t.Errorf("got error on offset %d: %v", curOffset, err)
break
}
s, err := resp.UpdatedSchema(ctx)
if err != nil {
t.Errorf("getting schema error: %v", err)
Expand Down
6 changes: 4 additions & 2 deletions bigquery/storage/managedwriter/managed_stream_test.go
Expand Up @@ -231,7 +231,8 @@ func TestManagedStream_FlowControllerFailure(t *testing.T) {
// Create a context that will expire during the append.
// This is expected to surface a flowcontroller error, as there's no
// capacity.
expireCtx, _ := context.WithTimeout(ctx, 100*time.Millisecond)
expireCtx, cancel := context.WithTimeout(ctx, 100*time.Millisecond)
defer cancel()
_, err := ms.AppendRows(expireCtx, fakeData)
if err == nil {
t.Errorf("expected AppendRows to error, but it succeeded")
Expand Down Expand Up @@ -317,7 +318,8 @@ func TestManagedStream_LeakingGoroutines(t *testing.T) {
// Send a bunch of appends that expire quicker than response, and monitor that
// goroutine growth stays within bounded threshold.
for i := 0; i < 500; i++ {
expireCtx, _ := context.WithTimeout(ctx, 25*time.Millisecond)
expireCtx, cancel := context.WithTimeout(ctx, 25*time.Millisecond)
defer cancel()
ms.AppendRows(expireCtx, fakeData)
if i%50 == 0 {
if current := runtime.NumGoroutine(); current > threshold {
Expand Down

0 comments on commit 3cb6fe1

Please sign in to comment.