X-Git-Url: https://git.giacomolli.uk/onechat/blobdiff_plain/000ae97acb21a1c0c90e9278177a74411ba6eab2..522d7fd117285e4e4ce3ea5ec9b5a1722521b681:/replay_test.go diff --git a/replay_test.go b/replay_test.go index 547b5e4..e6b8daa 100644 --- a/replay_test.go +++ b/replay_test.go @@ -46,6 +46,7 @@ func TestReplaySyntheticLog(t *testing.T) { }() batches := 0 + low := viewChatHigh long := make([]bool, messages) for id := range messages { @@ -81,6 +82,7 @@ func TestReplaySyntheticLog(t *testing.T) { runtime.GC() var stats runtime.MemStats + runtime.ReadMemStats(&stats) t.Logf("heap in use: %d KB", stats.HeapInuse/1024) } @@ -210,6 +212,7 @@ func replayRequireOnlySummaries(t *testing.T, memory *Memory, long []bool, full } require.Equal(t, head+strings.ReplaceAll(node.Text, "\n", " "), rendered[n+1]) + if line.level == 0 && long[line.index] { require.True(t, strings.HasPrefix(node.Text, "summary "), "message %d", line.index) }