Skip to content

Commit

Permalink
Try commenting generated layer closure
Browse files Browse the repository at this point in the history
  • Loading branch information
danieljbruce committed Nov 28, 2024
1 parent b022a71 commit 263768b
Show file tree
Hide file tree
Showing 2 changed files with 15 additions and 2 deletions.
15 changes: 14 additions & 1 deletion src/tabular-api-surface.ts
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@ import {Row} from './row';
import {ChunkTransformer} from './chunktransformer';
import {BackoffSettings} from 'google-gax/build/src/gax';
import {google} from '../protos/protos';
import {CallOptions, ServiceError} from 'google-gax';
import {CallOptions, grpc, ServiceError} from 'google-gax';
import {Duplex, PassThrough, Transform} from 'stream';
import * as is from 'is';
import {GoogleInnerError} from './table';
Expand Down Expand Up @@ -480,6 +480,19 @@ Please use the format 'prezzy' or '${instance.name}/tables/prezzy'.`);
);
retryTimer = setTimeout(makeNewRequest, nextRetryDelay);
} else {
if (
!error.code &&
error.message === 'The client has already been closed.'
) {
//
// The TestReadRows_Generic_CloseClient conformance test requires
// a grpc code to be present when the client is closed. According
// to Gemini, the appropriate code for a closed client is
// CANCELLED since the user actually cancelled the call by closing
// the client.
//
error.code = grpc.status.CANCELLED;
}
userStream.emit('error', error);
}
})
Expand Down
2 changes: 1 addition & 1 deletion testproxy/services/close-client.js
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@ const closeClient = ({clientMap}) =>
const bigtable = clientMap.get(clientId);

if (bigtable) {
await bigtable[v2].close();
// await bigtable[v2].close();
await bigtable.close();
return {};
}
Expand Down

0 comments on commit 263768b

Please sign in to comment.