File tree Expand file tree Collapse file tree 1 file changed +9
-4
lines changed
appengine/standard/logging/test Expand file tree Collapse file tree 1 file changed +9
-4
lines changed Original file line number Diff line number Diff line change @@ -41,17 +41,22 @@ public function testIndex()
4141 $ response ->getBody ()->getContents ()
4242 );
4343
44- $ this ->verifyLog ('This will show up as log level INFO ' , 'info ' );
44+ $ this ->verifyLog ('This will show up as log level INFO ' , 'info ' , 3 );
45+
46+ // These should succeed if the above call has too.
47+ // Thus, they need fewer retries!
4548 $ this ->verifyLog ('This will show up as log level WARNING ' , 'warning ' );
4649 $ this ->verifyLog ('This will show up as log level ERROR ' , 'error ' );
4750 }
4851
49- private function verifyLog ($ message , $ level , $ retryCount = 5 )
52+ private function verifyLog ($ message , $ level , $ retryCount = 2 )
5053 {
54+ $ fiveMinAgo = date (\DateTime::RFC3339 , strtotime ('-5 minutes ' ));
5155 $ filter = sprintf (
52- 'resource.type = "gae_app" AND severity = "%s" AND logName = "%s" ' ,
56+ 'resource.type= "gae_app" severity= "%s" logName="%s" timestamp>= "%s" ' ,
5357 strtoupper ($ level ),
54- sprintf ('projects/%s/logs/app ' , self ::$ projectId )
58+ sprintf ('projects/%s/logs/app ' , self ::$ projectId ),
59+ $ fiveMinAgo
5560 );
5661 $ logOptions = [
5762 'pageSize ' => 20 ,
You can’t perform that action at this time.
0 commit comments