From 0706496528cdecd6a01ca847e3deb0a223c425d8 Mon Sep 17 00:00:00 2001 From: Aleksandr Nogikh Date: Mon, 2 Dec 2024 16:08:13 +0100 Subject: pkg/bisect: recognize lost connection errors Only select them as relevant if there are not other crash types. --- pkg/bisect/bisect_test.go | 28 ++++++++++++++++++++++++++++ 1 file changed, 28 insertions(+) (limited to 'pkg/bisect/bisect_test.go') diff --git a/pkg/bisect/bisect_test.go b/pkg/bisect/bisect_test.go index 5160cffed..959d6640a 100644 --- a/pkg/bisect/bisect_test.go +++ b/pkg/bisect/bisect_test.go @@ -958,6 +958,34 @@ func TestMostFrequentReport(t *testing.T) { report: "A", other: true, }, + { + name: "do not take lost connection", + reports: []*report.Report{ + {Title: "A", Type: crash.LostConnection}, + {Title: "B", Type: crash.Warning}, + {Title: "C", Type: crash.LostConnection}, + {Title: "D", Type: crash.Warning}, + {Title: "E", Type: crash.LostConnection}, + {Title: "F", Type: crash.Warning}, + }, + types: []crash.Type{crash.Warning}, + report: "B", + other: true, + }, + { + name: "only lost connection", + reports: []*report.Report{ + {Title: "A", Type: crash.LostConnection}, + {Title: "B", Type: crash.LostConnection}, + {Title: "C", Type: crash.LostConnection}, + {Title: "D", Type: crash.LostConnection}, + {Title: "E", Type: crash.LostConnection}, + {Title: "F", Type: crash.LostConnection}, + }, + types: []crash.Type{crash.LostConnection}, + report: "A", + other: false, + }, } for _, test := range tests { test := test -- cgit mrf-deployment