@@ -30,38 +30,33 @@ $args = getenv('TEST_PHP_ARGS')." ".getenv("TEST_PHP_EXTRA_ARGS");
3030$ cmd = $ php ." " .$ args ." -r 'posix_kill(posix_getpid(), 11);' " ;
3131system ($ cmd );
3232
33- try {
34- $ rr ->waitForRequest (function ($ request ) {
35- if ($ request ["uri " ] != "/telemetry/proxy/api/v2/apmtelemetry " ) {
36- return false ;
37- }
38- $ body = json_decode ($ request ["body " ], true );
39- $ batch = $ body ["request_type " ] == "message-batch " ? $ body ["payload " ] : [$ body ];
33+ $ rr ->waitForRequest (function ($ request ) {
34+ if ($ request ["uri " ] != "/telemetry/proxy/api/v2/apmtelemetry " ) {
35+ return false ;
36+ }
37+ $ body = json_decode ($ request ["body " ], true );
38+ $ batch = $ body ["request_type " ] == "message-batch " ? $ body ["payload " ] : [$ body ];
4039
41- foreach ($ batch as $ json ) {
42- if ($ json ["request_type " ] != "logs " || !isset ($ json ["payload " ]["logs " ])) {
43- continue ;
44- }
40+ foreach ($ batch as $ json ) {
41+ if ($ json ["request_type " ] != "logs " || !isset ($ json ["payload " ]["logs " ])) {
42+ continue ;
43+ }
4544
46- foreach ($ json ["payload " ]["logs " ] as $ payload ) {
47- if (!($ payload ["is_crash " ] ?? false )) {
48- continue ; // Not an actual crash report (crash pings have is_crash: false)
49- }
50- $ output = json_encode ($ payload , JSON_PRETTY_PRINT );
45+ foreach ($ json ["payload " ]["logs " ] as $ payload ) {
46+ $ payload ["message " ] = json_decode ($ payload ["message " ], true );
47+ $ output = json_encode ($ payload , JSON_PRETTY_PRINT );
5148
52- echo $ output ;
49+ echo $ output ;
5350
54- return true ;
55- }
51+ return true ;
5652 }
53+ }
5754
58- return false ;
59- });
60- echo "unexpected: crash report received when crashtracking is disabled \n" ;
61- } catch (Exception $ e ) {
62- echo $ e ->getMessage () . "\n" ;
63- }
55+ return false ;
56+ });
6457
6558?>
6659--EXPECTF--
67- %Await for replay timeout
60+ %A
61+ Fatal error: Uncaught Exception: wait for replay timeout in %s
62+ %A
0 commit comments