materialized view and a bit better ui
This commit is contained in:
1 parent
26b677154b
commit
49f9bb3458
30 files changed
+2184
-106
No files matched your search
@@ -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)
|
||||
}
|
||||
|
||||
|
||||
Reference in new issue
Block a user