MCPcopy Create free account
hub / github.com/DOSNetwork/core / TestDialToEthDeadline

Function TestDialToEthDeadline

onchain/eth_helpers_test.go:71–82  ·  view source on GitHub ↗
(t *testing.T)

Source from the content-addressed store, hash-verified

69}
70
71func TestDialToEthDeadline(t *testing.T) {
72 urls = []string{"ws://18.236.117.126:8546", "ws:18.236.115.126:8546"}
73 d := time.Now().Add(1 * time.Second)
74 ctx, cancelFunc := context.WithDeadline(context.Background(), d)
75 defer cancelFunc()
76 clients := DialToEth(ctx, urls)
77 time.Sleep(2 * time.Second)
78
79 for range clients {
80 t.Errorf("Should not receive any client")
81 }
82}
83
84func TestDialToEthErrHandling(t *testing.T) {
85 var tUrls []string

Callers

nothing calls this directly

Calls 2

DialToEthFunction · 0.85
AddMethod · 0.45

Tested by

no test coverage detected