Skip to content

Commit

Permalink
rpc: fix erroneous error-message in test (ethereum#28227)
Browse files Browse the repository at this point in the history
hyunchel committed Oct 6, 2023
1 parent e816142 commit eb042fb
Showing 1 changed file with 4 additions and 3 deletions.
7 changes: 4 additions & 3 deletions rpc/server_test.go
Original file line number Diff line number Diff line change
@@ -32,17 +32,18 @@ func TestServerRegisterName(t *testing.T) {
server := NewServer()
service := new(testService)

if err := server.RegisterName("test", service); err != nil {
svcName := "test"
if err := server.RegisterName(svcName, service); err != nil {
t.Fatalf("%v", err)
}

if len(server.services.services) != 2 {
t.Fatalf("Expected 2 service entries, got %d", len(server.services.services))
}

svc, ok := server.services.services["test"]
svc, ok := server.services.services[svcName]
if !ok {
t.Fatalf("Expected service calc to be registered")
t.Fatalf("Expected service %s to be registered", svcName)
}

wantCallbacks := 14

0 comments on commit eb042fb

Please sign in to comment.