diff --git a/go/views/findings.go b/go/views/findings.go index d1e64887..555d56e3 100644 --- a/go/views/findings.go +++ b/go/views/findings.go @@ -158,15 +158,11 @@ func overrunFinding(module string, past []process.Handling, at time.Time) viewFi } // unheardFinding is the module's one finding of the patterns its hub does not hear (design 47 H2b §836 4.): its id `.`, -// its summary each pattern with its stream and why, at most five and then how many more, and the way through: the node's service +// its summary each pattern with its stream and why, every one named (no bound), and the way through: the node's service // manager restarts the module's unit. func unheardFinding(module, node string, list []process.Unheard, at time.Time) viewFinding { var named []string - for i, u := range list { - if i == overrunMost { - named = append(named, fmt.Sprintf("and %d more", len(list)-overrunMost)) - break - } + for _, u := range list { if u.Stream == "" { named = append(named, fmt.Sprintf("%s (%s)", u.Pattern, u.Why)) continue diff --git a/go/views/views_test.go b/go/views/views_test.go index dc5747ff..c351a20b 100644 --- a/go/views/views_test.go +++ b/go/views/views_test.go @@ -1591,6 +1591,14 @@ func TestTheOverrunFindingNamesTheHandlingsOldestFirst(t *testing.T) { !strings.Contains(f.summary, "mesh.seat.s.event.e.> on SEAT_s_e (not composed)") || !strings.Contains(f.summary, "mesh.mod.p.event.x (no stream carries it)") { t.Errorf("the finding: %+v", f) } + // §836 4.: each pattern not heard is named, however many + var many []process.Unheard + for i := range 8 { + many = append(many, process.Unheard{Pattern: fmt.Sprintf("mesh.mod.p.event.x%d", i), Why: "no stream carries it"}) + } + if f := unheardFinding("builder", "n1", many, at); !strings.Contains(f.summary, "mesh.mod.p.event.x7 (no stream carries it)") || strings.Contains(f.summary, "more") || !strings.Contains(f.summary, "does not hear 8 event patterns") { + t.Errorf("eight patterns not heard were not all named: %s", f.summary) + } fm := &findingsMap{} pr := &ProcessReader{Module: "m", Findings: func() WireWriter { return fm }, Now: func() time.Time { return at }} pr.unheardPatterns(list)