Skip to content

Commit 23a2b97

Browse files
authored
chore(testproxy): Address the TestReadModifyWriteRow_Generic_DeadlineExceeded conformance test (#1543)
**Summary** The conformance test passes a timeout setting into the `createClient` test proxy service. With this change the timeout setting will now be applied to the client and used in the readModifyWriteRow call. This allows the `TestReadModifyWriteRow_Generic_DeadlineExceeded` conformance test to pass because now the timeout is being used for these calls.
1 parent 47689b6 commit 23a2b97

File tree

2 files changed

+5
-14
lines changed

2 files changed

+5
-14
lines changed

testproxy/known_failures.txt

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,6 @@ TestMutateRow_Generic_DeadlineExceeded\|
33
TestMutateRows_Generic_CloseClient\|
44
TestMutateRows_Retry_WithRoutingCookie\|
55
TestMutateRows_Generic_DeadlineExceeded\|
6-
TestReadModifyWriteRow_Generic_DeadlineExceeded\|
76
TestReadModifyWriteRow_NoRetry_MultiValues\|
87
TestReadModifyWriteRow_Generic_CloseClient\|
98
TestReadModifyWriteRow_Generic_MultiStreams\|

testproxy/services/create-client.js

Lines changed: 5 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -31,7 +31,9 @@ const createClient = ({clientMap}) =>
3131
normalizeCallback(async rawRequest => {
3232
// TODO: Handle refresh periods
3333
const {request} = rawRequest;
34-
const clientConfig = require('../../src/v2/bigtable_client_config.json');
34+
const clientConfig = JSON.parse(
35+
JSON.stringify(require('../../src/v2/bigtable_client_config.json'))
36+
);
3537
const {
3638
callCredential,
3739
clientId,
@@ -68,18 +70,8 @@ const createClient = ({clientMap}) =>
6870
*/
6971
Object.entries(
7072
clientConfig.interfaces['google.bigtable.v2.Bigtable'].methods
71-
).forEach(([k, v]) => {
72-
if (k === 'ReadRows') {
73-
/*
74-
TODO: In the future we should apply this for all methods, but right
75-
now doing so results in regressions in the TestSampleRowKeys_Generic_MultiStreams
76-
and TestSampleRowKeys_Generic_CloseClient conformance tests that need
77-
to be addressed.
78-
*/
79-
v.timeout_millis = durationToMilliseconds(
80-
request.perOperationTimeout
81-
);
82-
}
73+
).forEach(([, v]) => {
74+
v.timeout_millis = durationToMilliseconds(request.perOperationTimeout);
8375
});
8476
}
8577
const bigtable = new Bigtable({

0 commit comments

Comments
 (0)