diff options
author | 2022-04-28 13:23:11 +0100 | |
---|---|---|
committer | 2022-04-28 13:23:11 +0100 | |
commit | 420e2fb22bc7aa4967ddadb11e444079efdf5117 (patch) | |
tree | 413842c5df646c30a8079671ade5e677e3825fb8 /internal/federation/federatingdb/reject_test.go | |
parent | [bugfix] Fix possible race condition in federatingdb (#490) (diff) | |
download | gotosocial-420e2fb22bc7aa4967ddadb11e444079efdf5117.tar.xz |
replace async client API / federator msg processing with worker pools (#497)
* replace async client API / federator msg processing with worker pools
* appease our lord-and-saviour, the linter
Diffstat (limited to 'internal/federation/federatingdb/reject_test.go')
-rw-r--r-- | internal/federation/federatingdb/reject_test.go | 6 |
1 files changed, 2 insertions, 4 deletions
diff --git a/internal/federation/federatingdb/reject_test.go b/internal/federation/federatingdb/reject_test.go index 825ff92b3..52730925d 100644 --- a/internal/federation/federatingdb/reject_test.go +++ b/internal/federation/federatingdb/reject_test.go @@ -26,7 +26,6 @@ import ( "github.com/superseriousbusiness/activity/streams" "github.com/superseriousbusiness/gotosocial/internal/db" "github.com/superseriousbusiness/gotosocial/internal/gtsmodel" - "github.com/superseriousbusiness/gotosocial/internal/messages" "github.com/superseriousbusiness/gotosocial/internal/uris" "github.com/superseriousbusiness/gotosocial/testrig" ) @@ -40,8 +39,7 @@ func (suite *RejectTestSuite) TestRejectFollowRequest() { // remote_account_2 rejects the follow request followingAccount := suite.testAccounts["local_account_1"] followedAccount := suite.testAccounts["remote_account_2"] - fromFederatorChan := make(chan messages.FromFederator, 10) - ctx := createTestContext(followingAccount, followedAccount, fromFederatorChan) + ctx := createTestContext(followingAccount, followedAccount) // put the follow request in the database fr := >smodel.FollowRequest{ @@ -84,7 +82,7 @@ func (suite *RejectTestSuite) TestRejectFollowRequest() { suite.NoError(err) // there should be nothing in the federator channel since nothing needs to be passed - suite.Empty(fromFederatorChan) + suite.Empty(suite.fromFederator) // the follow request should not be in the database anymore -- it's been rejected err = suite.db.GetByID(ctx, fr.ID, >smodel.FollowRequest{}) |