Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

test: Add retries to increase reliability of test #1319

Merged
merged 6 commits into from
Oct 23, 2023
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
12 changes: 10 additions & 2 deletions system-test/read-rows.ts
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@ import {describe, it, afterEach, beforeEach} from 'mocha';
import * as sinon from 'sinon';
import {EventEmitter} from 'events';
import {Test} from './testTypes';
import {ServiceError, GrpcClient, GoogleError} from 'google-gax';
import {ServiceError, GrpcClient, GoogleError, CallOptions} from 'google-gax';
import {PassThrough} from 'stream';

const {grpc} = new GrpcClient();
Expand Down Expand Up @@ -96,7 +96,15 @@ describe('Bigtable/Table', () => {
},
});
await operation.promise();
await table.create({});
const gaxOptions: CallOptions = {
retry: {
retryCodes: [grpc.status.DEADLINE_EXCEEDED, grpc.status.NOT_FOUND],
},
maxRetries: 10,
};
await table.create({
gaxOptions,
});
await table.getRows(); // This is done to initialize the data client
await bigtable.close();
try {
Expand Down
Loading