From 5367927ab2a2ebd6761c9ec76684c539b7b4d19c Mon Sep 17 00:00:00 2001 From: Gisle Aune Date: Sun, 29 Nov 2020 18:12:08 +0100 Subject: [PATCH] fix benchmark failure. --- handle_test.go | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/handle_test.go b/handle_test.go index d4e0018..12ca5f8 100644 --- a/handle_test.go +++ b/handle_test.go @@ -40,11 +40,11 @@ func BenchmarkHandle(b *testing.B) { eventName := strconv.FormatInt(rng.Int63(), 36) + strconv.FormatInt(rng.Int63(), 36) + strconv.FormatInt(rng.Int63(), 36) client := irc.New(context.Background(), irc.Config{}) - event := irc.NewEvent("test", eventName) + event := irc.NewEvent("test_event", eventName) wg := sync.WaitGroup{} client.AddHandler(func(event2 *irc.Event, _ *irc.Client) { - if event2.Kind() != "hook" { + if event2.Kind() == "test_event" { wg.Done() } })