---- 测试:ErrNodeOffline ----
(t *testing.T)
| 269 | // ---- 测试:ErrNodeOffline ---- |
| 270 | |
| 271 | func TestCall_OfflineNode(t *testing.T) { |
| 272 | hub := New(Options{PeerExtractor: mdPeerExtractor}) |
| 273 | _ = newTestEnv(t, hub) |
| 274 | |
| 275 | _, err := hub.Call(context.Background(), "ghost", "x", nil) |
| 276 | if !errors.Is(err, ErrNodeOffline) { |
| 277 | t.Fatalf("expected ErrNodeOffline, got %v", err) |
| 278 | } |
| 279 | } |
| 280 | |
| 281 | // ---- 测试:并发 Call ---- |
| 282 |
nothing calls this directly
no test coverage detected