feat: publish durable queue and spool gauges
This commit is contained in:
@@ -0,0 +1,22 @@
|
||||
package spool
|
||||
|
||||
import (
|
||||
"context"
|
||||
"path/filepath"
|
||||
"testing"
|
||||
"time"
|
||||
)
|
||||
|
||||
func TestTelemetryReportsQueuedDurableSpool_HP_OPS_07(t *testing.T) {
|
||||
t.Parallel()
|
||||
ctx := context.Background()
|
||||
store := openTestStore(t, ctx, filepath.Join(t.TempDir(), "spool"), DefaultTombstoneLimit)
|
||||
issue := testUUID(t, "019c46f1-1d02-7000-8000-0000000000d2")
|
||||
if _, err := store.AcceptCommand(ctx, testCommand(issue, []byte("telemetry")), time.Now().UTC()); err != nil {
|
||||
t.Fatal(err)
|
||||
}
|
||||
telemetry, err := store.Telemetry(ctx)
|
||||
if err != nil || telemetry.QueuedCommands != 1 || telemetry.ChargedBytes == 0 {
|
||||
t.Fatalf("telemetry = %#v, %v", telemetry, err)
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user