File tree Expand file tree Collapse file tree 1 file changed +5
-0
lines changed Expand file tree Collapse file tree 1 file changed +5
-0
lines changed Original file line number Diff line number Diff line change 16
16
# This test builds and deploys the two secure services
17
17
# to test that they interact properly together.
18
18
19
+ import datetime
19
20
import os
20
21
import subprocess
21
22
import time
@@ -117,7 +118,11 @@ def test_end_to_end(services):
117
118
time .sleep (10 ) # Slight delay writing to stackdriver
118
119
client = logging_v2 .LoggingServiceV2Client ()
119
120
resource_names = [f"projects/{ project } " ]
121
+ # We add timestamp for making the query faster.
122
+ now = datetime .datetime .now (datetime .timezone .utc )
123
+ filter_date = now - datetime .timedelta (minutes = 1 )
120
124
filters = (
125
+ f"timestamp>=\" { filter_date .isoformat ('T' )} \" "
121
126
"resource.type=cloud_run_revision "
122
127
"AND severity=NOTICE "
123
128
f"AND resource.labels.service_name={ service_name } "
You can’t perform that action at this time.
0 commit comments