(t *testing.T)
| 39 | } |
| 40 | |
| 41 | func TestQueueProtocolAPI(t *testing.T) { |
| 42 | var option client.QueueProtocolOption |
| 43 | option.SendTimeout = time.Millisecond |
| 44 | option.WaitTimeout = 100 * time.Millisecond |
| 45 | |
| 46 | _, err := client.New(nil, nil) |
| 47 | if err == nil { |
| 48 | t.Error("client.New(nil, nil) need return error") |
| 49 | } |
| 50 | |
| 51 | var q = queue.New("channel") |
| 52 | q.SetConfig(types.NewChain33Config(types.GetDefaultCfgstring())) |
| 53 | qc, err := client.New(q.Client(), &option) |
| 54 | if err != nil { |
| 55 | t.Errorf("client.New() cause error %v", err) |
| 56 | } |
| 57 | if qc == nil { |
| 58 | t.Error("queueprotoapi object is nil") |
| 59 | } |
| 60 | _, err = qc.Notify("", 1, "data") |
| 61 | assert.Nil(t, err) |
| 62 | |
| 63 | } |
| 64 | |
| 65 | func TestQueueProtocol(t *testing.T) { |
| 66 | testSendTx(t, api) |
nothing calls this directly
no test coverage detected