rpc: fix erroneous error-message in test (#28227)

pull/28245/head
hyunchel 1 year ago committed by GitHub
parent 2091ebdf5e
commit 7963c4e808
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
  1. 7
      rpc/server_test.go

@ -32,7 +32,8 @@ 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)
}
@ -40,9 +41,9 @@ func TestServerRegisterName(t *testing.T) {
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

Loading…
Cancel
Save