diff --git a/protocol/protocol_test.go b/protocol/protocol_test.go index ecee9c340..d8e9c3fd1 100644 --- a/protocol/protocol_test.go +++ b/protocol/protocol_test.go @@ -61,8 +61,8 @@ func TestPing(t *testing.T) { ar, aw := io.Pipe() br, bw := io.Pipe() - c0 := NewConnection(c0ID, ar, bw, nil, "name").(wireFormatConnection).next.(*rawConnection) - c1 := NewConnection(c1ID, br, aw, nil, "name").(wireFormatConnection).next.(*rawConnection) + c0 := NewConnection(c0ID, ar, bw, nil, "name", true).(wireFormatConnection).next.(*rawConnection) + c1 := NewConnection(c1ID, br, aw, nil, "name", true).(wireFormatConnection).next.(*rawConnection) if ok := c0.ping(); !ok { t.Error("c0 ping failed") @@ -85,8 +85,8 @@ func TestPingErr(t *testing.T) { eaw := &ErrPipe{PipeWriter: *aw, max: i, err: e} ebw := &ErrPipe{PipeWriter: *bw, max: j, err: e} - c0 := NewConnection(c0ID, ar, ebw, m0, "name").(wireFormatConnection).next.(*rawConnection) - NewConnection(c1ID, br, eaw, m1, "name") + c0 := NewConnection(c0ID, ar, ebw, m0, "name", true).(wireFormatConnection).next.(*rawConnection) + NewConnection(c1ID, br, eaw, m1, "name", true) res := c0.ping() if (i < 8 || j < 8) && res { @@ -161,8 +161,8 @@ func TestVersionErr(t *testing.T) { ar, aw := io.Pipe() br, bw := io.Pipe() - c0 := NewConnection(c0ID, ar, bw, m0, "name").(wireFormatConnection).next.(*rawConnection) - NewConnection(c1ID, br, aw, m1, "name") + c0 := NewConnection(c0ID, ar, bw, m0, "name", true).(wireFormatConnection).next.(*rawConnection) + NewConnection(c1ID, br, aw, m1, "name", true) w := xdr.NewWriter(c0.cw) w.WriteUint32(encodeHeader(header{ @@ -184,8 +184,8 @@ func TestTypeErr(t *testing.T) { ar, aw := io.Pipe() br, bw := io.Pipe() - c0 := NewConnection(c0ID, ar, bw, m0, "name").(wireFormatConnection).next.(*rawConnection) - NewConnection(c1ID, br, aw, m1, "name") + c0 := NewConnection(c0ID, ar, bw, m0, "name", true).(wireFormatConnection).next.(*rawConnection) + NewConnection(c1ID, br, aw, m1, "name", true) w := xdr.NewWriter(c0.cw) w.WriteUint32(encodeHeader(header{ @@ -207,8 +207,8 @@ func TestClose(t *testing.T) { ar, aw := io.Pipe() br, bw := io.Pipe() - c0 := NewConnection(c0ID, ar, bw, m0, "name").(wireFormatConnection).next.(*rawConnection) - NewConnection(c1ID, br, aw, m1, "name") + c0 := NewConnection(c0ID, ar, bw, m0, "name", true).(wireFormatConnection).next.(*rawConnection) + NewConnection(c1ID, br, aw, m1, "name", true) c0.close(nil)