materialized view and a bit better ui
Build and Publish / Metadata (push) Successful in 2s
Build and Publish / BuildAndDeployAmd64 (push) Successful in 1m3s

This commit is contained in:
mats committed 2026-09-19 12:43:17 +02:00
1 parent 26b677154b
commit 49f9bb3458
30 files changed
+2184 -106

No files matched your search

+12 -2
View File
@@ -38,7 +38,17 @@ func TestClickHouseStoreIntegration(t *testing.T) {
now := time.Now().UTC()
mk := func(minsAgo int, typ, service string, isErr bool, release string) websocket.HistoryEntry {
raw, _ := json.Marshal(map[string]interface{}{"n": minsAgo})
sev := 9
if isErr {
sev = 17
}
str := func(k, v string) map[string]any {
return map[string]any{"key": k, "value": map[string]any{"stringValue": v}}
}
raw, _ := json.Marshal(map[string]any{"resourceLogs": []any{map[string]any{
"resource": map[string]any{"attributes": []any{str("service.name", service), str("service.release", release)}},
"scopeLogs": []any{map[string]any{"logRecords": []any{map[string]any{"severityNumber": sev, "n": minsAgo}}}},
}}})
return websocket.HistoryEntry{
Type: typ,
Timestamp: now.Add(-time.Duration(minsAgo) * time.Minute).UnixNano(),
@@ -58,7 +68,7 @@ func TestClickHouseStoreIntegration(t *testing.T) {
}
}
// Flush async insert buffer before reading.
if err := s.conn.AsyncInsert(ctx, "INSERT INTO FUNCTION null('x UInt8') VALUES (0)", true); err != nil {
if err := s.conn.Exec(ctx, "SYSTEM FLUSH ASYNC INSERT QUEUE"); err != nil {
t.Fatalf("flush: %v", err)
}