Skip to content
This repository was archived by the owner on Mar 26, 2026. It is now read-only.

Commit 870526f

Browse files
committed
chore: revert "chore: revert "tests: fix TestReadRow_Generic_DeadlineExceeded""
This reverts commit 7eec031.
1 parent db4ac9c commit 870526f

3 files changed

Lines changed: 16 additions & 15 deletions

File tree

src/row.ts

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -30,7 +30,7 @@ import {CallOptions} from 'google-gax';
3030
import {ServiceError} from 'google-gax';
3131
import {google} from '../protos/protos';
3232
import {RowDataUtils, RowProperties} from './row-data-utils';
33-
import {TabularApiSurface} from './tabular-api-surface';
33+
import {GetRowsOptions, TabularApiSurface} from './tabular-api-surface';
3434
import {getRowsInternal} from './utils/getRowsInternal';
3535
import {
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 =

src/utils/createReadStreamInternal.ts

Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff 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
}

testproxy/known_failures.txt

Lines changed: 0 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -2,18 +2,5 @@ TestMutateRow_Generic_CloseClient\|
22
TestMutateRow_Generic_DeadlineExceeded\|
33
TestReadModifyWriteRow_Generic_DeadlineExceeded\|
44
TestReadRow_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\|
185
TestSampleRowKeys_Generic_Headers\|
196
TestSampleRowKeys_NoRetry_NoEmptyKey\|

0 commit comments

Comments
 (0)