Mock net.Conn needs updating for interface changes.

This commit is contained in:
Alex Bramley 2012-02-04 01:16:19 +00:00
parent 1c62354cb8
commit eb87e56f96
1 changed files with 8 additions and 8 deletions

View File

@ -24,7 +24,7 @@ type mockNetConn struct {
rc chan bool
closed bool
rt, wt int64
rt, wt time.Time
}
func MockNetConn(t *testing.T) *mockNetConn {
@ -143,18 +143,18 @@ func (m *mockNetConn) RemoteAddr() net.Addr {
return &net.IPAddr{net.IPv4(127, 0, 0, 1)}
}
func (m *mockNetConn) SetTimeout(ns int64) error {
m.rt = ns
m.wt = ns
func (m *mockNetConn) SetDeadline(t time.Time) error {
m.rt = t
m.wt = t
return nil
}
func (m *mockNetConn) SetReadTimeout(ns int64) error {
m.rt = ns
func (m *mockNetConn) SetReadDeadline(t time.Time) error {
m.rt = t
return nil
}
func (m *mockNetConn) SetWriteTimeout(ns int64) error {
m.wt = ns
func (m *mockNetConn) SetWriteDeadline(t time.Time) error {
m.wt = t
return nil
}