Add MsgBus.Metrics() test

This commit is contained in:
James Mills 2018-05-10 22:22:30 -07:00
orang tua a461510220
melakukan b03fa5864e
Tidak diketahui kunci yang ditemukan di database signature
GPG Key ID: AC4C014F1440EBD6

Melihat File

@ -164,6 +164,17 @@ func TestServeHTTPSubscriber(t *testing.T) {
assert.Equal(msg.Payload, []byte("hello world"))
}
func TestMsgBusMetrics(t *testing.T) {
assert := assert.New(t)
opts := Options{
WithMetrics: true,
}
mb := New(&opts)
assert.IsType(&Metrics{}, mb.Metrics())
}
func BenchmarkMessageBusPut(b *testing.B) {
mb := New(nil)
topic := mb.NewTopic("foo")