diff options
| author | Aleksandr Nogikh <nogikh@google.com> | 2024-12-02 16:08:13 +0100 |
|---|---|---|
| committer | Aleksandr Nogikh <nogikh@google.com> | 2024-12-03 09:29:37 +0000 |
| commit | 0706496528cdecd6a01ca847e3deb0a223c425d8 (patch) | |
| tree | 9f8650f72c91f7cde055f691f23b8d13d134b9cb /pkg/bisect/bisect_test.go | |
| parent | 9bacd5a34e12f90560c1d594634e0526185facde (diff) | |
pkg/bisect: recognize lost connection errors
Only select them as relevant if there are not other crash types.
Diffstat (limited to 'pkg/bisect/bisect_test.go')
| -rw-r--r-- | pkg/bisect/bisect_test.go | 28 |
1 files changed, 28 insertions, 0 deletions
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 |
