aboutsummaryrefslogtreecommitdiff
path: root/jsonrpc/client/message_dispatcher_test.go
diff options
context:
space:
mode:
authorhozan23 <hozan23@karyontech.net>2024-06-15 05:46:08 +0200
committerhozan23 <hozan23@karyontech.net>2024-06-15 05:46:08 +0200
commit1a221d4d37f4bdee1fb45141828e201948e8ddd3 (patch)
treea6ed1a19e98c336bc598d4bfe97fe3965d14e2c8 /jsonrpc/client/message_dispatcher_test.go
parente9af9bc115e0869570b9b79e1610b2bc08abe5a1 (diff)
fix typos
Diffstat (limited to 'jsonrpc/client/message_dispatcher_test.go')
-rw-r--r--jsonrpc/client/message_dispatcher_test.go13
1 files changed, 4 insertions, 9 deletions
diff --git a/jsonrpc/client/message_dispatcher_test.go b/jsonrpc/client/message_dispatcher_test.go
index 7cc1366..a1fc1c6 100644
--- a/jsonrpc/client/message_dispatcher_test.go
+++ b/jsonrpc/client/message_dispatcher_test.go
@@ -1,9 +1,6 @@
package client
import (
- // "sync"
- // "sync/atomic"
-
"sync"
"sync/atomic"
"testing"
@@ -12,7 +9,6 @@ import (
)
func TestDispatchToChannel(t *testing.T) {
-
messageDispatcher := newMessageDispatcher[int, int](10)
chanKey := 1
@@ -26,7 +22,7 @@ func TestDispatchToChannel(t *testing.T) {
wg.Add(1)
go func() {
for i := 0; i < 50; i++ {
- err := messageDispatcher.disptach(chanKey, i)
+ err := messageDispatcher.dispatch(chanKey, i)
assert.Nil(t, err)
}
@@ -37,7 +33,7 @@ func TestDispatchToChannel(t *testing.T) {
wg.Add(1)
go func() {
for i := 0; i < 50; i++ {
- err := messageDispatcher.disptach(chanKey2, i)
+ err := messageDispatcher.dispatch(chanKey2, i)
assert.Nil(t, err)
}
@@ -79,12 +75,11 @@ func TestUnregisterChannel(t *testing.T) {
_, ok := <-rx
assert.False(t, ok, "chan closed")
- err := messageDispatcher.disptach(chanKey, 1)
+ err := messageDispatcher.dispatch(chanKey, 1)
assert.NotNil(t, err)
}
func TestClearChannels(t *testing.T) {
-
messageDispatcher := newMessageDispatcher[int, int](1)
chanKey := 1
@@ -96,6 +91,6 @@ func TestClearChannels(t *testing.T) {
_, ok := <-rx
assert.False(t, ok, "chan closed")
- err := messageDispatcher.disptach(chanKey, 1)
+ err := messageDispatcher.dispatch(chanKey, 1)
assert.NotNil(t, err)
}