Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Commit 0d78724

Browse files
author
Takashi Matsuo
authored
fix(iap): add sleep to avoid test failures (GoogleCloudPlatform#4613)
fixes GoogleCloudPlatform#4467
1 parent 19f35d6 commit 0d78724

File tree

1 file changed

+7
-0
lines changed

1 file changed

+7
-0
lines changed

iap/iap_test.py

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -15,6 +15,7 @@
1515
"""Test script for Identity-Aware Proxy code samples."""
1616

1717
import os
18+
import time
1819

1920
import pytest
2021

@@ -55,6 +56,12 @@ def test_main(capsys):
5556
expected_audience = '/projects/{}/apps/{}'.format(
5657
IAP_PROJECT_NUMBER, IAP_APP_ID)
5758

59+
# We see occational test failures when the system clock in our
60+
# test VMs is incorrect. Sleeping 30 seconds to avoid the failure.
61+
# https://github.com/GoogleCloudPlatform/python-docs-samples/issues/4467
62+
63+
time.sleep(30)
64+
5865
jwt_validation_result = validate_jwt.validate_iap_jwt(
5966
iap_jwt, expected_audience)
6067

0 commit comments

Comments
 (0)