@@ -273,6 +273,7 @@ func TestMultipleProcesses(t *testing.T) {
273273 }
274274 assert .True (t , found1 )
275275 assert .True (t , found2 )
276+ assert .Len (t , p .configCache , 0 )
276277}
277278
278279func TestInvalidEvent (t * testing.T ) {
@@ -447,14 +448,9 @@ func TestOneProcessMultipleLogFiles(t *testing.T) {
447448 changes = p .processEvents (unsetBundle )
448449 assert .Len (t , changes .Schedule , 0 )
449450 assert .Len (t , changes .Unschedule , 2 )
450- found1 , found2 = false , false
451- for _ , config := range changes .Unschedule {
452- if config .Name == "process-123-test-service-gen" {
453- found1 = true
454- }
455- }
456- // both configs have the same name, but different digests. The unschedule logic only uses name.
457- // let's check that both configs are unscheduled
458- assert .True (t , found1 )
451+ // both configs have the same name, but different digests. The unschedule logic uses ServiceID,
452+ // so both configs should be unscheduled.
453+ assert .Equal (t , "process-123-test-service-gen" , changes .Unschedule [0 ].Name )
454+ assert .Equal (t , "process-123-test-service-gen" , changes .Unschedule [1 ].Name )
459455 assert .Len (t , p .configCache , 0 )
460456}
0 commit comments