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 3 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
5 changes: 4 additions & 1 deletion system-test/read-rows.ts
Original file line number Diff line number Diff line change
Expand Up @@ -85,7 +85,7 @@ describe('Bigtable/Table', () => {
const TABLE = INSTANCE.table('table');

describe('close', () => {
it('should fail when invoking readRows with closed client', async () => {
it.skip('should fail when invoking readRows with closed client', async () => {
Copy link
Contributor

@kolea2 kolea2 Aug 22, 2023

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

can we add retries to this test instead? I would prefer not to skip it, unless it is consistently failing (in which case we should investigate an alternate solution there too).

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Yes. I added a change which will still allow the test to run and retry in the appropriate circumstances.

const instance = bigtable.instance(INSTANCE_NAME);
const table = instance.table('fake-table');
const [, operation] = await instance.create({
Expand All @@ -108,11 +108,14 @@ describe('Bigtable/Table', () => {
assert.strictEqual(err.message, 'The client has already been closed.');
}
});
/*
Add this block back in when the previous test is skipped
after(async () => {
const bigtableSecondClient = new Bigtable();
const instance = bigtableSecondClient.instance(INSTANCE_NAME);
await instance.delete({});
});
*/
});

describe('createReadStream', () => {
Expand Down
Loading