This repository was archived by the owner on Mar 26, 2026. It is now read-only.
File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -30,7 +30,7 @@ import {CallOptions} from 'google-gax';
3030import { ServiceError } from 'google-gax' ;
3131import { google } from '../protos/protos' ;
3232import { RowDataUtils , RowProperties } from './row-data-utils' ;
33- import { TabularApiSurface } from './tabular-api-surface' ;
33+ import { GetRowsOptions , TabularApiSurface } from './tabular-api-surface' ;
3434import { getRowsInternal } from './utils/getRowsInternal' ;
3535import {
3636 MethodName ,
@@ -667,9 +667,10 @@ export class Row {
667667 filter = arrify ( filter ) . concat ( options . filter ) ;
668668 }
669669
670- const getRowsOptions = Object . assign ( { } , options , {
670+ const getRowsOptions : GetRowsOptions = Object . assign ( { } , options , {
671671 keys : [ this . id ] ,
672672 filter,
673+ limit : 1 ,
673674 } ) ;
674675
675676 const metricsCollector =
Original file line number Diff line number Diff line change @@ -428,6 +428,19 @@ export function createReadStreamInternal(
428428 rowStreamPipe ( rowStream , userStream ) ;
429429 } ;
430430
431+ // If the timeout is exceeded for the whole operation, bail with
432+ // an error as the conformance test requires.
433+ if ( timeout ) {
434+ const deadlineTimer = setTimeout ( ( ) => {
435+ const err = new Error ( `Total timeout of ${ timeout } ms exceeded.` ) ;
436+ ( err as unknown as grpc . StatusObject ) . code =
437+ grpc . status . DEADLINE_EXCEEDED ;
438+ userStream . destroy ( err ) ;
439+ } , timeout ) ;
440+
441+ userStream . on ( 'close' , ( ) => clearTimeout ( deadlineTimer ) ) ;
442+ }
443+
431444 makeNewRequest ( ) ;
432445 return userStream ;
433446}
Original file line number Diff line number Diff line change @@ -2,18 +2,5 @@ TestMutateRow_Generic_CloseClient\|
22TestMutateRow_Generic_DeadlineExceeded\|
33TestReadModifyWriteRow_Generic_DeadlineExceeded\|
44TestReadRow_Generic_DeadlineExceeded\|
5- TestMutateRows_Retry_WithRoutingCookie\|
6- TestReadRow_Generic_DeadlineExceeded\|
7- TestReadRow_Retry_WithRoutingCookie\|
8- TestReadRow_Retry_WithRetryInfo\|
9- TestReadRows_ReverseScans_FeatureFlag_Enabled\|
10- TestReadRows_NoRetry_OutOfOrderError_Reverse\|
11- TestReadRows_Retry_LastScannedRow_Reverse\|
12- TestReadRows_Retry_WithRoutingCookie\|
13- TestReadRows_Retry_WithRoutingCookie_MultipleErrorResponses\|
14- TestReadRows_Retry_WithRetryInfo\|
15- TestReadRows_Retry_WithRetryInfo_MultipleErrorResponse\|
16- TestSampleRowKeys_Retry_WithRoutingCookie\|
17- TestSampleRowKeys_Generic_CloseClient\|
185TestSampleRowKeys_Generic_Headers\|
196TestSampleRowKeys_NoRetry_NoEmptyKey\|
You can’t perform that action at this time.
0 commit comments