@@ -112,7 +112,7 @@ public static int TestEntryPoint()
112112 traceeProcess . BeginErrorReadLine ( ) ;
113113
114114 Console . WriteLine ( $ "Waiting for tracee process to exit...") ;
115- if ( ! traceeProcess . HasExited && ! traceeProcess . WaitForExit ( 5000 ) )
115+ if ( ! traceeProcess . HasExited && ! traceeProcess . WaitForExit ( 15000 ) )
116116 {
117117 Console . WriteLine ( $ "Tracee process did not exit within the 5s timeout, killing it.") ;
118118 traceeProcess . Kill ( ) ;
@@ -125,7 +125,7 @@ public static int TestEntryPoint()
125125 Console . WriteLine ( $ "Stopping record-trace with SIGINT.") ;
126126 Kill ( recordTraceProcess . Id , SIGINT ) ;
127127 Console . WriteLine ( $ "Waiting for record-trace to exit...") ;
128- if ( ! recordTraceProcess . WaitForExit ( 20000 ) )
128+ if ( ! recordTraceProcess . WaitForExit ( 30000 ) )
129129 {
130130 // record-trace needs to stop gracefully to generate the trace file
131131 Console . WriteLine ( $ "record-trace did not exit within the 20s timeout, killing it.") ;
@@ -157,21 +157,32 @@ public static int TestEntryPoint()
157157 private static bool ValidateTraceeEvents ( string traceFilePath )
158158 {
159159 using EventPipeEventSource source = new EventPipeEventSource ( traceFilePath ) ;
160+ bool startEventFound = false ;
161+ bool stopEventFound = false ;
160162 bool allocationSampledEventFound = false ;
161163
162164 source . Dynamic . All += ( TraceEvent e ) =>
163165 {
164166 if ( e . ProviderName == "Microsoft-Windows-DotNETRuntime" )
165167 {
166- if ( e . EventName == "AllocationSampled" || ( e . ID == ( TraceEventID ) 303 && e . EventName . StartsWith ( "Unknown" ) ) )
168+ Console . WriteLine ( $ "Event: { e . ProviderName } - { e . EventName } (ID: { e . ID } )") ;
169+ if ( e . EventName == "GC/Start" || ( e . ID == ( TraceEventID ) 1 && e . EventName . StartsWith ( "Unknown" ) ) )
170+ {
171+ startEventFound = true ;
172+ }
173+ else if ( e . EventName == "GC/Stop" || ( e . ID == ( TraceEventID ) 2 && e . EventName . StartsWith ( "Unknown" ) ) )
174+ {
175+ stopEventFound = true ;
176+ }
177+ else if ( e . EventName == "AllocationSampled" || ( e . ID == ( TraceEventID ) 303 && e . EventName . StartsWith ( "Unknown" ) ) )
167178 {
168179 allocationSampledEventFound = true ;
169180 }
170181 }
171182 } ;
172183
173184 source . Process ( ) ;
174- return allocationSampledEventFound ;
185+ return startEventFound && stopEventFound && allocationSampledEventFound ;
175186 }
176187
177188 private static void UploadTraceFile ( string traceFilePath )
0 commit comments