|
|
|
@ -377,17 +377,19 @@ end |
|
|
|
else |
|
|
|
else |
|
|
|
@test length(metrics) == 0 |
|
|
|
@test length(metrics) == 0 |
|
|
|
end |
|
|
|
end |
|
|
|
# Not a pid |
|
|
|
if procfs_available |
|
|
|
empty!(Prometheus.DEFAULT_REGISTRY.collectors) |
|
|
|
# Not a pid |
|
|
|
procc = Prometheus.ProcessCollector(() -> "notapid") |
|
|
|
empty!(Prometheus.DEFAULT_REGISTRY.collectors) |
|
|
|
empty!(Prometheus.DEFAULT_REGISTRY.collectors) |
|
|
|
procc = Prometheus.ProcessCollector(() -> "notapid") |
|
|
|
metrics = @test_logs (:error, r"/proc/notapid/ does not exist") Prometheus.collect(procc) |
|
|
|
empty!(Prometheus.DEFAULT_REGISTRY.collectors) |
|
|
|
@test length(metrics) == 0 |
|
|
|
metrics = @test_logs (:error, r"/proc/notapid/ does not exist") Prometheus.collect(procc) |
|
|
|
# Pid function error |
|
|
|
@test length(metrics) == 0 |
|
|
|
empty!(Prometheus.DEFAULT_REGISTRY.collectors) |
|
|
|
# Pid function error |
|
|
|
procc = Prometheus.ProcessCollector(() -> error()) |
|
|
|
empty!(Prometheus.DEFAULT_REGISTRY.collectors) |
|
|
|
metrics = @test_logs (:error, r"pid from the lambda") Prometheus.collect(procc) |
|
|
|
procc = Prometheus.ProcessCollector(() -> error()) |
|
|
|
@test length(metrics) == 0 |
|
|
|
metrics = @test_logs (:error, r"pid from the lambda") Prometheus.collect(procc) |
|
|
|
|
|
|
|
@test length(metrics) == 0 |
|
|
|
|
|
|
|
end |
|
|
|
end |
|
|
|
end |
|
|
|
|
|
|
|
|
|
|
|
@testset "Prometheus.expose(::Union{String, IO})" begin |
|
|
|
@testset "Prometheus.expose(::Union{String, IO})" begin |
|
|
|
|