From 0d91bf323ec32f46453b2c4c1877e8eeb830ab4d Mon Sep 17 00:00:00 2001 From: Joram Wilander Date: Wed, 27 Jun 2018 05:08:40 -0400 Subject: Lock bulk importing to master database node (#9012) --- store/storetest/mocks/LayeredStoreDatabaseLayer.go | 10 ++++++++++ store/storetest/mocks/SqlStore.go | 10 ++++++++++ store/storetest/mocks/Store.go | 10 ++++++++++ store/storetest/store.go | 2 ++ 4 files changed, 32 insertions(+) (limited to 'store/storetest') diff --git a/store/storetest/mocks/LayeredStoreDatabaseLayer.go b/store/storetest/mocks/LayeredStoreDatabaseLayer.go index adbe1068c..47b594a81 100644 --- a/store/storetest/mocks/LayeredStoreDatabaseLayer.go +++ b/store/storetest/mocks/LayeredStoreDatabaseLayer.go @@ -200,6 +200,11 @@ func (_m *LayeredStoreDatabaseLayer) License() store.LicenseStore { return r0 } +// LockToMaster provides a mock function with given fields: +func (_m *LayeredStoreDatabaseLayer) LockToMaster() { + _m.Called() +} + // MarkSystemRanUnitTests provides a mock function with given fields: func (_m *LayeredStoreDatabaseLayer) MarkSystemRanUnitTests() { _m.Called() @@ -851,6 +856,11 @@ func (_m *LayeredStoreDatabaseLayer) TotalSearchDbConnections() int { return r0 } +// UnlockFromMaster provides a mock function with given fields: +func (_m *LayeredStoreDatabaseLayer) UnlockFromMaster() { + _m.Called() +} + // User provides a mock function with given fields: func (_m *LayeredStoreDatabaseLayer) User() store.UserStore { ret := _m.Called() diff --git a/store/storetest/mocks/SqlStore.go b/store/storetest/mocks/SqlStore.go index 021baa7d3..a0cc3f0cc 100644 --- a/store/storetest/mocks/SqlStore.go +++ b/store/storetest/mocks/SqlStore.go @@ -411,6 +411,11 @@ func (_m *SqlStore) License() store.LicenseStore { return r0 } +// LockToMaster provides a mock function with given fields: +func (_m *SqlStore) LockToMaster() { + _m.Called() +} + // MarkSystemRanUnitTests provides a mock function with given fields: func (_m *SqlStore) MarkSystemRanUnitTests() { _m.Called() @@ -706,6 +711,11 @@ func (_m *SqlStore) TotalSearchDbConnections() int { return r0 } +// UnlockFromMaster provides a mock function with given fields: +func (_m *SqlStore) UnlockFromMaster() { + _m.Called() +} + // User provides a mock function with given fields: func (_m *SqlStore) User() store.UserStore { ret := _m.Called() diff --git a/store/storetest/mocks/Store.go b/store/storetest/mocks/Store.go index dd1967cd5..3a5b7726c 100644 --- a/store/storetest/mocks/Store.go +++ b/store/storetest/mocks/Store.go @@ -198,6 +198,11 @@ func (_m *Store) License() store.LicenseStore { return r0 } +// LockToMaster provides a mock function with given fields: +func (_m *Store) LockToMaster() { + _m.Called() +} + // MarkSystemRanUnitTests provides a mock function with given fields: func (_m *Store) MarkSystemRanUnitTests() { _m.Called() @@ -437,6 +442,11 @@ func (_m *Store) TotalSearchDbConnections() int { return r0 } +// UnlockFromMaster provides a mock function with given fields: +func (_m *Store) UnlockFromMaster() { + _m.Called() +} + // User provides a mock function with given fields: func (_m *Store) User() store.UserStore { ret := _m.Called() diff --git a/store/storetest/store.go b/store/storetest/store.go index 677a63101..e73596ec4 100644 --- a/store/storetest/store.go +++ b/store/storetest/store.go @@ -77,6 +77,8 @@ func (s *Store) ChannelMemberHistory() store.ChannelMemberHistoryStore { } func (s *Store) MarkSystemRanUnitTests() { /* do nothing */ } func (s *Store) Close() { /* do nothing */ } +func (s *Store) LockToMaster() { /* do nothing */ } +func (s *Store) UnlockFromMaster() { /* do nothing */ } func (s *Store) DropAllTables() { /* do nothing */ } func (s *Store) TotalMasterDbConnections() int { return 1 } func (s *Store) TotalReadDbConnections() int { return 1 } -- cgit v1.2.3-1-g7c22