mirror of
https://github.com/refraction-networking/uquic.git
synced 2025-04-03 20:27:35 +03:00
use a gomock congestion in tests
This commit is contained in:
parent
af4c7c2faf
commit
f8e5a13c7d
8 changed files with 227 additions and 100 deletions
166
internal/mocks/ackhandler/sent_packet_handler.go
Normal file
166
internal/mocks/ackhandler/sent_packet_handler.go
Normal file
|
@ -0,0 +1,166 @@
|
|||
// Code generated by MockGen. DO NOT EDIT.
|
||||
// Source: github.com/lucas-clemente/quic-go/ackhandler (interfaces: SentPacketHandler)
|
||||
|
||||
// Package mockackhandler is a generated GoMock package.
|
||||
package mockackhandler
|
||||
|
||||
import (
|
||||
reflect "reflect"
|
||||
time "time"
|
||||
|
||||
gomock "github.com/golang/mock/gomock"
|
||||
ackhandler "github.com/lucas-clemente/quic-go/ackhandler"
|
||||
protocol "github.com/lucas-clemente/quic-go/internal/protocol"
|
||||
wire "github.com/lucas-clemente/quic-go/internal/wire"
|
||||
)
|
||||
|
||||
// MockSentPacketHandler is a mock of SentPacketHandler interface
|
||||
type MockSentPacketHandler struct {
|
||||
ctrl *gomock.Controller
|
||||
recorder *MockSentPacketHandlerMockRecorder
|
||||
}
|
||||
|
||||
// MockSentPacketHandlerMockRecorder is the mock recorder for MockSentPacketHandler
|
||||
type MockSentPacketHandlerMockRecorder struct {
|
||||
mock *MockSentPacketHandler
|
||||
}
|
||||
|
||||
// NewMockSentPacketHandler creates a new mock instance
|
||||
func NewMockSentPacketHandler(ctrl *gomock.Controller) *MockSentPacketHandler {
|
||||
mock := &MockSentPacketHandler{ctrl: ctrl}
|
||||
mock.recorder = &MockSentPacketHandlerMockRecorder{mock}
|
||||
return mock
|
||||
}
|
||||
|
||||
// EXPECT returns an object that allows the caller to indicate expected use
|
||||
func (m *MockSentPacketHandler) EXPECT() *MockSentPacketHandlerMockRecorder {
|
||||
return m.recorder
|
||||
}
|
||||
|
||||
// DequeuePacketForRetransmission mocks base method
|
||||
func (m *MockSentPacketHandler) DequeuePacketForRetransmission() *ackhandler.Packet {
|
||||
ret := m.ctrl.Call(m, "DequeuePacketForRetransmission")
|
||||
ret0, _ := ret[0].(*ackhandler.Packet)
|
||||
return ret0
|
||||
}
|
||||
|
||||
// DequeuePacketForRetransmission indicates an expected call of DequeuePacketForRetransmission
|
||||
func (mr *MockSentPacketHandlerMockRecorder) DequeuePacketForRetransmission() *gomock.Call {
|
||||
return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "DequeuePacketForRetransmission", reflect.TypeOf((*MockSentPacketHandler)(nil).DequeuePacketForRetransmission))
|
||||
}
|
||||
|
||||
// GetAlarmTimeout mocks base method
|
||||
func (m *MockSentPacketHandler) GetAlarmTimeout() time.Time {
|
||||
ret := m.ctrl.Call(m, "GetAlarmTimeout")
|
||||
ret0, _ := ret[0].(time.Time)
|
||||
return ret0
|
||||
}
|
||||
|
||||
// GetAlarmTimeout indicates an expected call of GetAlarmTimeout
|
||||
func (mr *MockSentPacketHandlerMockRecorder) GetAlarmTimeout() *gomock.Call {
|
||||
return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "GetAlarmTimeout", reflect.TypeOf((*MockSentPacketHandler)(nil).GetAlarmTimeout))
|
||||
}
|
||||
|
||||
// GetLeastUnacked mocks base method
|
||||
func (m *MockSentPacketHandler) GetLeastUnacked() protocol.PacketNumber {
|
||||
ret := m.ctrl.Call(m, "GetLeastUnacked")
|
||||
ret0, _ := ret[0].(protocol.PacketNumber)
|
||||
return ret0
|
||||
}
|
||||
|
||||
// GetLeastUnacked indicates an expected call of GetLeastUnacked
|
||||
func (mr *MockSentPacketHandlerMockRecorder) GetLeastUnacked() *gomock.Call {
|
||||
return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "GetLeastUnacked", reflect.TypeOf((*MockSentPacketHandler)(nil).GetLeastUnacked))
|
||||
}
|
||||
|
||||
// GetLowestPacketNotConfirmedAcked mocks base method
|
||||
func (m *MockSentPacketHandler) GetLowestPacketNotConfirmedAcked() protocol.PacketNumber {
|
||||
ret := m.ctrl.Call(m, "GetLowestPacketNotConfirmedAcked")
|
||||
ret0, _ := ret[0].(protocol.PacketNumber)
|
||||
return ret0
|
||||
}
|
||||
|
||||
// GetLowestPacketNotConfirmedAcked indicates an expected call of GetLowestPacketNotConfirmedAcked
|
||||
func (mr *MockSentPacketHandlerMockRecorder) GetLowestPacketNotConfirmedAcked() *gomock.Call {
|
||||
return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "GetLowestPacketNotConfirmedAcked", reflect.TypeOf((*MockSentPacketHandler)(nil).GetLowestPacketNotConfirmedAcked))
|
||||
}
|
||||
|
||||
// GetStopWaitingFrame mocks base method
|
||||
func (m *MockSentPacketHandler) GetStopWaitingFrame(arg0 bool) *wire.StopWaitingFrame {
|
||||
ret := m.ctrl.Call(m, "GetStopWaitingFrame", arg0)
|
||||
ret0, _ := ret[0].(*wire.StopWaitingFrame)
|
||||
return ret0
|
||||
}
|
||||
|
||||
// GetStopWaitingFrame indicates an expected call of GetStopWaitingFrame
|
||||
func (mr *MockSentPacketHandlerMockRecorder) GetStopWaitingFrame(arg0 interface{}) *gomock.Call {
|
||||
return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "GetStopWaitingFrame", reflect.TypeOf((*MockSentPacketHandler)(nil).GetStopWaitingFrame), arg0)
|
||||
}
|
||||
|
||||
// OnAlarm mocks base method
|
||||
func (m *MockSentPacketHandler) OnAlarm() {
|
||||
m.ctrl.Call(m, "OnAlarm")
|
||||
}
|
||||
|
||||
// OnAlarm indicates an expected call of OnAlarm
|
||||
func (mr *MockSentPacketHandlerMockRecorder) OnAlarm() *gomock.Call {
|
||||
return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "OnAlarm", reflect.TypeOf((*MockSentPacketHandler)(nil).OnAlarm))
|
||||
}
|
||||
|
||||
// ReceivedAck mocks base method
|
||||
func (m *MockSentPacketHandler) ReceivedAck(arg0 *wire.AckFrame, arg1 protocol.PacketNumber, arg2 protocol.EncryptionLevel, arg3 time.Time) error {
|
||||
ret := m.ctrl.Call(m, "ReceivedAck", arg0, arg1, arg2, arg3)
|
||||
ret0, _ := ret[0].(error)
|
||||
return ret0
|
||||
}
|
||||
|
||||
// ReceivedAck indicates an expected call of ReceivedAck
|
||||
func (mr *MockSentPacketHandlerMockRecorder) ReceivedAck(arg0, arg1, arg2, arg3 interface{}) *gomock.Call {
|
||||
return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "ReceivedAck", reflect.TypeOf((*MockSentPacketHandler)(nil).ReceivedAck), arg0, arg1, arg2, arg3)
|
||||
}
|
||||
|
||||
// SendingAllowed mocks base method
|
||||
func (m *MockSentPacketHandler) SendingAllowed() bool {
|
||||
ret := m.ctrl.Call(m, "SendingAllowed")
|
||||
ret0, _ := ret[0].(bool)
|
||||
return ret0
|
||||
}
|
||||
|
||||
// SendingAllowed indicates an expected call of SendingAllowed
|
||||
func (mr *MockSentPacketHandlerMockRecorder) SendingAllowed() *gomock.Call {
|
||||
return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "SendingAllowed", reflect.TypeOf((*MockSentPacketHandler)(nil).SendingAllowed))
|
||||
}
|
||||
|
||||
// SentPacket mocks base method
|
||||
func (m *MockSentPacketHandler) SentPacket(arg0 *ackhandler.Packet) error {
|
||||
ret := m.ctrl.Call(m, "SentPacket", arg0)
|
||||
ret0, _ := ret[0].(error)
|
||||
return ret0
|
||||
}
|
||||
|
||||
// SentPacket indicates an expected call of SentPacket
|
||||
func (mr *MockSentPacketHandlerMockRecorder) SentPacket(arg0 interface{}) *gomock.Call {
|
||||
return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "SentPacket", reflect.TypeOf((*MockSentPacketHandler)(nil).SentPacket), arg0)
|
||||
}
|
||||
|
||||
// SetHandshakeComplete mocks base method
|
||||
func (m *MockSentPacketHandler) SetHandshakeComplete() {
|
||||
m.ctrl.Call(m, "SetHandshakeComplete")
|
||||
}
|
||||
|
||||
// SetHandshakeComplete indicates an expected call of SetHandshakeComplete
|
||||
func (mr *MockSentPacketHandlerMockRecorder) SetHandshakeComplete() *gomock.Call {
|
||||
return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "SetHandshakeComplete", reflect.TypeOf((*MockSentPacketHandler)(nil).SetHandshakeComplete))
|
||||
}
|
||||
|
||||
// ShouldSendRetransmittablePacket mocks base method
|
||||
func (m *MockSentPacketHandler) ShouldSendRetransmittablePacket() bool {
|
||||
ret := m.ctrl.Call(m, "ShouldSendRetransmittablePacket")
|
||||
ret0, _ := ret[0].(bool)
|
||||
return ret0
|
||||
}
|
||||
|
||||
// ShouldSendRetransmittablePacket indicates an expected call of ShouldSendRetransmittablePacket
|
||||
func (mr *MockSentPacketHandlerMockRecorder) ShouldSendRetransmittablePacket() *gomock.Call {
|
||||
return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "ShouldSendRetransmittablePacket", reflect.TypeOf((*MockSentPacketHandler)(nil).ShouldSendRetransmittablePacket))
|
||||
}
|
Loading…
Add table
Add a link
Reference in a new issue