@@ -156,8 +156,7 @@ func (s *JobRunnerSuite) TestJobWithCleanupStepsStartToFinish() {
156156 TargetManagerReleaseTimeout : 10 * time .Second ,
157157 Tests : []* test.Test {
158158 {
159- Name : testName ,
160- CleanupName : testName ,
159+ Name : testName ,
161160 TargetManagerBundle : & target.TargetManagerBundle {
162161 AcquireParameters : acquireParameters ,
163162 TargetManager : targetlist .New (),
@@ -186,10 +185,10 @@ func (s *JobRunnerSuite) TestJobWithCleanupStepsStartToFinish() {
186185{[1 1 SimpleTest 0 ][Target{ID: "T1"} TargetAcquired]}
187186{[1 1 SimpleTest 0 test_step_label][Target{ID: "T1"} TargetIn]}
188187{[1 1 SimpleTest 0 test_step_label][Target{ID: "T1"} TargetOut]}
189- {[1 1 SimpleTest 0 test_cleanup_step][Target{ID: "T1"} TargetIn]}
190- {[1 1 SimpleTest 0 test_cleanup_step][Target{ID: "T1"} TargetOut]}
188+ {[1 1 SimpleTest [CLEANUP] 0 test_cleanup_step][Target{ID: "T1"} TargetIn]}
189+ {[1 1 SimpleTest [CLEANUP] 0 test_cleanup_step][Target{ID: "T1"} TargetOut]}
191190{[1 1 SimpleTest 0 ][Target{ID: "T1"} TargetReleased]}
192- ` , s .MemoryStorage .GetTargetEvents (ctx , []string {testName }, "T1" ))
191+ ` , s .MemoryStorage .GetTargetEvents (ctx , []string {testName , fmt . Sprintf ( "%s [CLEANUP]" , testName ) }, "T1" ))
193192}
194193
195194func (s * JobRunnerSuite ) TestJobWithTestRetry () {
@@ -243,8 +242,7 @@ func (s *JobRunnerSuite) TestJobWithTestRetry() {
243242 },
244243 Tests : []* test.Test {
245244 {
246- Name : testName ,
247- CleanupName : fmt .Sprintf ("%s:CLEANUP" , testName ),
245+ Name : testName ,
248246 RetryParameters : test.RetryParameters {
249247 NumRetries : 1 ,
250248 RetryInterval : xjson .Duration (time .Millisecond ), // make a small interval to test waiting branch
@@ -283,8 +281,8 @@ func (s *JobRunnerSuite) TestJobWithTestRetry() {
283281{[1 1 SimpleTest 0 echo1_step_label][Target{ID: "T1"} TargetOut]}
284282{[1 1 SimpleTest 0 test_step_label][Target{ID: "T1"} TargetIn]}
285283{[1 1 SimpleTest 0 test_step_label][Target{ID: "T1"} TargetErr &"{\"Error\":\"some error\"}"]}
286- {[1 1 SimpleTest: CLEANUP 0 test_cleanup_step][Target{ID: "T1"} TargetIn]}
287- {[1 1 SimpleTest: CLEANUP 0 test_cleanup_step][Target{ID: "T1"} TargetOut]}
284+ {[1 1 SimpleTest [ CLEANUP] 0 test_cleanup_step][Target{ID: "T1"} TargetIn]}
285+ {[1 1 SimpleTest [ CLEANUP] 0 test_cleanup_step][Target{ID: "T1"} TargetOut]}
288286{[1 1 SimpleTest 0 ][Target{ID: "T1"} TargetReleased]}
289287{[1 1 SimpleTest 1 ][Target{ID: "T1"} TargetAcquired]}
290288{[1 1 SimpleTest 1 echo1_step_label][Target{ID: "T1"} TargetIn]}
@@ -293,10 +291,10 @@ func (s *JobRunnerSuite) TestJobWithTestRetry() {
293291{[1 1 SimpleTest 1 test_step_label][Target{ID: "T1"} TargetOut]}
294292{[1 1 SimpleTest 1 echo2_step_label][Target{ID: "T1"} TargetIn]}
295293{[1 1 SimpleTest 1 echo2_step_label][Target{ID: "T1"} TargetOut]}
296- {[1 1 SimpleTest: CLEANUP 1 test_cleanup_step][Target{ID: "T1"} TargetIn]}
297- {[1 1 SimpleTest: CLEANUP 1 test_cleanup_step][Target{ID: "T1"} TargetOut]}
294+ {[1 1 SimpleTest [ CLEANUP] 1 test_cleanup_step][Target{ID: "T1"} TargetIn]}
295+ {[1 1 SimpleTest [ CLEANUP] 1 test_cleanup_step][Target{ID: "T1"} TargetOut]}
298296{[1 1 SimpleTest 1 ][Target{ID: "T1"} TargetReleased]}
299- ` , s .MemoryStorage .GetTargetEvents (ctx , []string {testName , fmt .Sprintf ("%s: CLEANUP" , testName )}, "T1" ))
297+ ` , s .MemoryStorage .GetTargetEvents (ctx , []string {testName , fmt .Sprintf ("%s [ CLEANUP] " , testName )}, "T1" ))
300298
301299 require .Len (s .T (), reporter .runStatuses , 1 )
302300 require .Len (s .T (), reporter .runStatuses [0 ].TestStatuses , 1 )
@@ -357,8 +355,7 @@ func (s *JobRunnerSuite) TestJobRetryOnFailedAcquire() {
357355 },
358356 Tests : []* test.Test {
359357 {
360- Name : testName ,
361- CleanupName : testName ,
358+ Name : testName ,
362359 RetryParameters : test.RetryParameters {
363360 NumRetries : 1 ,
364361 RetryInterval : xjson .Duration (time .Millisecond ), // make a small interval to test waiting branch
@@ -396,12 +393,12 @@ func (s *JobRunnerSuite) TestJobRetryOnFailedAcquire() {
396393{[1 1 SimpleTest 1 ][Target{ID: "T1"} TargetAcquired]}
397394{[1 1 SimpleTest 1 echo1_step_label][Target{ID: "T1"} TargetIn]}
398395{[1 1 SimpleTest 1 echo1_step_label][Target{ID: "T1"} TargetOut]}
399- {[1 1 SimpleTest 1 test_cleanup_step_1][Target{ID: "T1"} TargetIn]}
400- {[1 1 SimpleTest 1 test_cleanup_step_1][Target{ID: "T1"} TargetOut]}
401- {[1 1 SimpleTest 1 test_cleanup_step_2][Target{ID: "T1"} TargetIn]}
402- {[1 1 SimpleTest 1 test_cleanup_step_2][Target{ID: "T1"} TargetOut]}
396+ {[1 1 SimpleTest [CLEANUP] 1 test_cleanup_step_1][Target{ID: "T1"} TargetIn]}
397+ {[1 1 SimpleTest [CLEANUP] 1 test_cleanup_step_1][Target{ID: "T1"} TargetOut]}
398+ {[1 1 SimpleTest [CLEANUP] 1 test_cleanup_step_2][Target{ID: "T1"} TargetIn]}
399+ {[1 1 SimpleTest [CLEANUP] 1 test_cleanup_step_2][Target{ID: "T1"} TargetOut]}
403400{[1 1 SimpleTest 1 ][Target{ID: "T1"} TargetReleased]}
404- ` , s .MemoryStorage .GetTestEvents (ctx , []string {testName }))
401+ ` , s .MemoryStorage .GetTestEvents (ctx , []string {testName , fmt . Sprintf ( "%s [CLEANUP]" , testName ) }))
405402
406403 require .Len (s .T (), reporter .runStatuses , 1 )
407404 require .Len (s .T (), reporter .runStatuses [0 ].TestStatuses , 1 )
0 commit comments