Skip to content
This repository was archived by the owner on Oct 19, 2023. It is now read-only.

Commit a66a0dd

Browse files
proppyGerrit Code Review
authored andcommitted
Merge "google-assistant-sdk: bump e2e test propagation delay"
2 parents 6cede57 + f40f431 commit a66a0dd

File tree

1 file changed

+9
-5
lines changed

1 file changed

+9
-5
lines changed

google-assistant-sdk/tests/test_endtoend.py

Lines changed: 9 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -13,6 +13,7 @@
1313
# See the License for the specific language governing permissions and
1414
# limitations under the License.
1515

16+
import builtins
1617
import json
1718
import tempfile
1819
import time
@@ -23,7 +24,10 @@
2324
import uuid
2425

2526

26-
import builtins
27+
# Propagation delays for Device Registration API resource creation.
28+
DEVICE_MODEL_PROPAGATION_DELAY_S = 30
29+
DEVICE_INSTANCE_PROPAGATION_DELAY_S = 60
30+
2731
PROJECT_ID = os.environ.get('PROJECT_ID', 'dummy-project-id')
2832

2933

@@ -38,9 +42,9 @@ def device_model():
3842
'--trait', 'action.devices.traits.OnOff',
3943
'--manufacturer', 'assistant-sdk-test',
4044
'--product-name', 'assistant-sdk-test'])
41-
# Wait 10s for model registration to be consistent
45+
# Wait for model registration to be consistent
4246
# on the Device Registration API.
43-
time.sleep(10)
47+
time.sleep(DEVICE_MODEL_PROPAGATION_DELAY_S)
4448
yield device_model_id
4549
subprocess.check_call(['python', '-m',
4650
'googlesamples.assistant.grpc.devicetool',
@@ -57,9 +61,9 @@ def device_instance(device_model):
5761
'register-device', '--model', device_model,
5862
'--client-type', 'SERVICE',
5963
'--device', device_instance_id])
60-
# Wait 30s for device registration to be consistent
64+
# Wait for device registration to be consistent
6165
# on the Device Registration API.
62-
time.sleep(30)
66+
time.sleep(DEVICE_INSTANCE_PROPAGATION_DELAY_S)
6367
yield device_instance_id
6468
subprocess.check_call(['python', '-m',
6569
'googlesamples.assistant.grpc.devicetool',

0 commit comments

Comments
 (0)