(t *testing.T)
| 69 | } |
| 70 | |
| 71 | func 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 | |
| 84 | func TestDialToEthErrHandling(t *testing.T) { |
| 85 | var tUrls []string |