def test_projects_mixed_buckets(store: RedisRealtimeMetricsStore, redis_cluster: redis._RedisCluster) -> None: redis_cluster.set("symbolicate_event_low_priority:counter:10:42:111", 0) redis_cluster.set("symbolicate_event_low_priority:counter:5:53:111", 0) candidates = store.projects() assert list(candidates) == [42]
def test_projects_one_histogram(store: RedisRealtimeMetricsStore, redis_cluster: redis._RedisCluster) -> None: redis_cluster.hset("symbolicate_event_low_priority:duration:10:42:111:0", 0, 123) candidates = store.projects() assert list(candidates) == [42]
def test_projects_negative_timestamp( store: RedisRealtimeMetricsStore, redis_cluster: redis._RedisCluster) -> None: redis_cluster.set("symbolicate_event_low_priority:counter:10:42:-111", 0) candidates = store.projects() assert list(candidates) == [42]
def test_projects_multiple_metric_types( store: RedisRealtimeMetricsStore, redis_cluster: redis._RedisCluster) -> None: redis_cluster.set("symbolicate_event_low_priority:counter:10:42:111", 0) redis_cluster.hset("symbolicate_event_low_priority:duration:10:53:111:20", 20, 456) candidates = store.projects() assert list(candidates) == [42, 53]
def test_projects_empty(store: RedisRealtimeMetricsStore, redis_cluster: redis._RedisCluster) -> None: redis_cluster.set( "symbolicate_event_low_priority:counter:10:42:111", 0, ) redis_cluster.delete("symbolicate_event_low_priority:counter:10:42:111") candidates = store.projects() assert list(candidates) == []
def test_projects_unset(store: RedisRealtimeMetricsStore) -> None: candidates = store.projects() assert list(candidates) == []