diff --git a/persistence/memory_test.go b/persistence/memory_test.go index 5052d4c8..de152280 100644 --- a/persistence/memory_test.go +++ b/persistence/memory_test.go @@ -23,7 +23,7 @@ type MemorySuite struct { func (s *MemorySuite) TestQueue() { a := assert.New(s.T()) - qs, err := s.p.NewQueueStore(queue_test.TestServerConfig, queue_test.TestClientID) + qs, err := s.p.NewQueueStore(queue_test.TestServerConfig, queue_test.TestNotifier, queue_test.TestClientID) a.Nil(err) queue_test.TestQueue(s.T(), qs) } diff --git a/persistence/queue/queue_mock.go b/persistence/queue/queue_mock.go index bb9f6575..9fb61a5e 100644 --- a/persistence/queue/queue_mock.go +++ b/persistence/queue/queue_mock.go @@ -172,37 +172,37 @@ func (m *MockNotifier) EXPECT() *MockNotifierMockRecorder { } // NotifyDropped mocks base method -func (m *MockNotifier) NotifyDropped(clientID string, elem *Elem, err error) { +func (m *MockNotifier) NotifyDropped(elem *Elem, err error) { m.ctrl.T.Helper() - m.ctrl.Call(m, "NotifyDropped", clientID, elem, err) + m.ctrl.Call(m, "NotifyDropped", elem, err) } // NotifyDropped indicates an expected call of NotifyDropped -func (mr *MockNotifierMockRecorder) NotifyDropped(clientID, elem, err interface{}) *gomock.Call { +func (mr *MockNotifierMockRecorder) NotifyDropped(elem, err interface{}) *gomock.Call { mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "NotifyDropped", reflect.TypeOf((*MockNotifier)(nil).NotifyDropped), clientID, elem, err) + return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "NotifyDropped", reflect.TypeOf((*MockNotifier)(nil).NotifyDropped), elem, err) } // NotifyInflightAdded mocks base method -func (m *MockNotifier) NotifyInflightAdded(clientID string, delta int) { +func (m *MockNotifier) NotifyInflightAdded(delta int) { m.ctrl.T.Helper() - m.ctrl.Call(m, "NotifyInflightAdded", clientID, delta) + m.ctrl.Call(m, "NotifyInflightAdded", delta) } // NotifyInflightAdded indicates an expected call of NotifyInflightAdded -func (mr *MockNotifierMockRecorder) NotifyInflightAdded(clientID, delta interface{}) *gomock.Call { +func (mr *MockNotifierMockRecorder) NotifyInflightAdded(delta interface{}) *gomock.Call { mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "NotifyInflightAdded", reflect.TypeOf((*MockNotifier)(nil).NotifyInflightAdded), clientID, delta) + return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "NotifyInflightAdded", reflect.TypeOf((*MockNotifier)(nil).NotifyInflightAdded), delta) } // NotifyMsgQueueAdded mocks base method -func (m *MockNotifier) NotifyMsgQueueAdded(clientID string, delta int) { +func (m *MockNotifier) NotifyMsgQueueAdded(delta int) { m.ctrl.T.Helper() - m.ctrl.Call(m, "NotifyMsgQueueAdded", clientID, delta) + m.ctrl.Call(m, "NotifyMsgQueueAdded", delta) } // NotifyMsgQueueAdded indicates an expected call of NotifyMsgQueueAdded -func (mr *MockNotifierMockRecorder) NotifyMsgQueueAdded(clientID, delta interface{}) *gomock.Call { +func (mr *MockNotifierMockRecorder) NotifyMsgQueueAdded(delta interface{}) *gomock.Call { mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "NotifyMsgQueueAdded", reflect.TypeOf((*MockNotifier)(nil).NotifyMsgQueueAdded), clientID, delta) + return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "NotifyMsgQueueAdded", reflect.TypeOf((*MockNotifier)(nil).NotifyMsgQueueAdded), delta) } diff --git a/persistence/redis_test.go b/persistence/redis_test.go index 829e210a..ec354d84 100644 --- a/persistence/redis_test.go +++ b/persistence/redis_test.go @@ -68,7 +68,7 @@ func (s *RedisSuite) TestQueue() { a := assert.New(s.T()) cfg := queue_test.TestServerConfig cfg.Persistence.Redis = redisConfig - qs, err := s.p.NewQueueStore(cfg, queue_test.TestClientID) + qs, err := s.p.NewQueueStore(cfg, queue_test.TestNotifier, queue_test.TestClientID) a.Nil(err) queue_test.TestQueue(s.T(), qs) } diff --git a/server/persistence_mock.go b/server/persistence_mock.go index 73a8d0f4..0e626e51 100644 --- a/server/persistence_mock.go +++ b/server/persistence_mock.go @@ -52,18 +52,18 @@ func (mr *MockPersistenceMockRecorder) Open() *gomock.Call { } // NewQueueStore mocks base method -func (m *MockPersistence) NewQueueStore(config config.Config, notifier queue.Notifier, clientID string) (queue.Store, error) { +func (m *MockPersistence) NewQueueStore(config config.Config, defaultNotifier queue.Notifier, clientID string) (queue.Store, error) { m.ctrl.T.Helper() - ret := m.ctrl.Call(m, "NewQueueStore", config, notifier, clientID) + ret := m.ctrl.Call(m, "NewQueueStore", config, defaultNotifier, clientID) ret0, _ := ret[0].(queue.Store) ret1, _ := ret[1].(error) return ret0, ret1 } // NewQueueStore indicates an expected call of NewQueueStore -func (mr *MockPersistenceMockRecorder) NewQueueStore(config, notifier, clientID interface{}) *gomock.Call { +func (mr *MockPersistenceMockRecorder) NewQueueStore(config, defaultNotifier, clientID interface{}) *gomock.Call { mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "NewQueueStore", reflect.TypeOf((*MockPersistence)(nil).NewQueueStore), config, notifier, clientID) + return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "NewQueueStore", reflect.TypeOf((*MockPersistence)(nil).NewQueueStore), config, defaultNotifier, clientID) } // NewSubscriptionStore mocks base method