diff options
author | Till <2353100+S7evinK@users.noreply.github.com> | 2022-12-22 10:56:20 +0100 |
---|---|---|
committer | GitHub <noreply@github.com> | 2022-12-22 10:56:20 +0100 |
commit | d3db542fbf5b35377586567b21bc5c28872167a1 (patch) | |
tree | 2eba368c1e0d4becba7e6b8e6e908a268873af55 /federationapi/queue/queue_test.go | |
parent | 76db8e90defdfb9e61f6caea8a312c5d60bcc005 (diff) |
Add federation peeking table tests (#2920)
As the title says, adds tests for inbound/outbound peeking federation
table tests.
Also removes some unused code
Diffstat (limited to 'federationapi/queue/queue_test.go')
-rw-r--r-- | federationapi/queue/queue_test.go | 22 |
1 files changed, 0 insertions, 22 deletions
diff --git a/federationapi/queue/queue_test.go b/federationapi/queue/queue_test.go index b2ec4b83..c317edc2 100644 --- a/federationapi/queue/queue_test.go +++ b/federationapi/queue/queue_test.go @@ -221,28 +221,6 @@ func (d *fakeDatabase) CleanEDUs(ctx context.Context, serverName gomatrixserverl return nil } -func (d *fakeDatabase) GetPendingPDUCount(ctx context.Context, serverName gomatrixserverlib.ServerName) (int64, error) { - d.dbMutex.Lock() - defer d.dbMutex.Unlock() - - var count int64 - if pdus, ok := d.associatedPDUs[serverName]; ok { - count = int64(len(pdus)) - } - return count, nil -} - -func (d *fakeDatabase) GetPendingEDUCount(ctx context.Context, serverName gomatrixserverlib.ServerName) (int64, error) { - d.dbMutex.Lock() - defer d.dbMutex.Unlock() - - var count int64 - if edus, ok := d.associatedEDUs[serverName]; ok { - count = int64(len(edus)) - } - return count, nil -} - func (d *fakeDatabase) GetPendingPDUServerNames(ctx context.Context) ([]gomatrixserverlib.ServerName, error) { d.dbMutex.Lock() defer d.dbMutex.Unlock() |