Remove service register/deregister in prometheus wrapper

This commit is contained in:
Nikolay Bondarenko 2019-01-25 18:13:12 +03:00 committed by Vasiliy Tolstov
parent 84c2b448b9
commit 57a323f700

View File

@ -56,10 +56,6 @@ func TestPrometheusMetrics(t *testing.T) {
t.Fatalf("Unexpected error starting server: %v", err) t.Fatalf("Unexpected error starting server: %v", err)
} }
if err := s.Register(); err != nil {
t.Fatalf("Unexpected error registering server: %v", err)
}
req := c.NewRequest(name, "Test.Method", &TestRequest{IsError: false}, client.WithContentType("application/json")) req := c.NewRequest(name, "Test.Method", &TestRequest{IsError: false}, client.WithContentType("application/json"))
rsp := TestResponse{} rsp := TestResponse{}
@ -90,7 +86,6 @@ func TestPrometheusMetrics(t *testing.T) {
assert.Equal(t, *metric.Metric[1].Label[1].Value, "success") assert.Equal(t, *metric.Metric[1].Label[1].Value, "success")
assert.Equal(t, *metric.Metric[1].Counter.Value, float64(1)) assert.Equal(t, *metric.Metric[1].Counter.Value, float64(1))
s.Deregister()
s.Stop() s.Stop()
} }