@@ -958,6 +958,34 @@ func TestMostFrequentReport(t *testing.T) {
958958 report : "A" ,
959959 other : true ,
960960 },
961+ {
962+ name : "do not take lost connection" ,
963+ reports : []* report.Report {
964+ {Title : "A" , Type : crash .LostConnection },
965+ {Title : "B" , Type : crash .Warning },
966+ {Title : "C" , Type : crash .LostConnection },
967+ {Title : "D" , Type : crash .Warning },
968+ {Title : "E" , Type : crash .LostConnection },
969+ {Title : "F" , Type : crash .Warning },
970+ },
971+ types : []crash.Type {crash .Warning },
972+ report : "B" ,
973+ other : true ,
974+ },
975+ {
976+ name : "only lost connection" ,
977+ reports : []* report.Report {
978+ {Title : "A" , Type : crash .LostConnection },
979+ {Title : "B" , Type : crash .LostConnection },
980+ {Title : "C" , Type : crash .LostConnection },
981+ {Title : "D" , Type : crash .LostConnection },
982+ {Title : "E" , Type : crash .LostConnection },
983+ {Title : "F" , Type : crash .LostConnection },
984+ },
985+ types : []crash.Type {crash .LostConnection },
986+ report : "A" ,
987+ other : false ,
988+ },
961989 }
962990 for _ , test := range tests {
963991 test := test
0 commit comments