diff options
author | 2024-04-16 13:10:13 +0200 | |
---|---|---|
committer | 2024-04-16 13:10:13 +0200 | |
commit | 3cceed11b28b5f42a653d85ed779d652fd8c26ad (patch) | |
tree | 0a7f0994e477609ca705a45f382dfb62056b196e /internal/processing/workers/fromclientapi_test.go | |
parent | [performance] cached oauth database types (#2838) (diff) | |
download | gotosocial-3cceed11b28b5f42a653d85ed779d652fd8c26ad.tar.xz |
[feature/performance] Store account stats in separate table (#2831)
* [feature/performance] Store account stats in separate table, get stats from remote
* test account stats
* add some missing increment / decrement calls
* change stats function signatures
* rejig logging a bit
* use lock when updating stats
Diffstat (limited to 'internal/processing/workers/fromclientapi_test.go')
-rw-r--r-- | internal/processing/workers/fromclientapi_test.go | 66 |
1 files changed, 36 insertions, 30 deletions
diff --git a/internal/processing/workers/fromclientapi_test.go b/internal/processing/workers/fromclientapi_test.go index 3d3630b11..5e294597d 100644 --- a/internal/processing/workers/fromclientapi_test.go +++ b/internal/processing/workers/fromclientapi_test.go @@ -182,11 +182,6 @@ func (suite *FromClientAPITestSuite) TestProcessCreateStatusWithNotification() { nil, nil, ) - statusJSON = suite.statusJSON( - ctx, - status, - receivingAccount, - ) ) // Update the follow from receiving account -> posting account so @@ -212,6 +207,12 @@ func (suite *FromClientAPITestSuite) TestProcessCreateStatusWithNotification() { suite.FailNow(err.Error()) } + statusJSON := suite.statusJSON( + ctx, + status, + receivingAccount, + ) + // Check message in home stream. suite.checkStreamed( homeStream, @@ -285,11 +286,6 @@ func (suite *FromClientAPITestSuite) TestProcessCreateStatusReply() { suite.testStatuses["local_account_2_status_1"], nil, ) - statusJSON = suite.statusJSON( - ctx, - status, - receivingAccount, - ) ) // Process the new status. @@ -305,6 +301,12 @@ func (suite *FromClientAPITestSuite) TestProcessCreateStatusReply() { suite.FailNow(err.Error()) } + statusJSON := suite.statusJSON( + ctx, + status, + receivingAccount, + ) + // Check message in home stream. suite.checkStreamed( homeStream, @@ -451,11 +453,6 @@ func (suite *FromClientAPITestSuite) TestProcessCreateStatusListRepliesPolicyLis suite.testStatuses["local_account_2_status_1"], nil, ) - statusJSON = suite.statusJSON( - ctx, - status, - receivingAccount, - ) ) // Modify replies policy of test list to show replies @@ -480,6 +477,12 @@ func (suite *FromClientAPITestSuite) TestProcessCreateStatusListRepliesPolicyLis suite.FailNow(err.Error()) } + statusJSON := suite.statusJSON( + ctx, + status, + receivingAccount, + ) + // Check message in home stream. suite.checkStreamed( homeStream, @@ -518,11 +521,6 @@ func (suite *FromClientAPITestSuite) TestProcessCreateStatusListRepliesPolicyLis suite.testStatuses["local_account_2_status_1"], nil, ) - statusJSON = suite.statusJSON( - ctx, - status, - receivingAccount, - ) ) // Modify replies policy of test list to show replies @@ -552,6 +550,12 @@ func (suite *FromClientAPITestSuite) TestProcessCreateStatusListRepliesPolicyLis suite.FailNow(err.Error()) } + statusJSON := suite.statusJSON( + ctx, + status, + receivingAccount, + ) + // Check message in home stream. suite.checkStreamed( homeStream, @@ -590,11 +594,6 @@ func (suite *FromClientAPITestSuite) TestProcessCreateStatusReplyListRepliesPoli suite.testStatuses["local_account_2_status_1"], nil, ) - statusJSON = suite.statusJSON( - ctx, - status, - receivingAccount, - ) ) // Modify replies policy of test list. @@ -619,6 +618,12 @@ func (suite *FromClientAPITestSuite) TestProcessCreateStatusReplyListRepliesPoli suite.FailNow(err.Error()) } + statusJSON := suite.statusJSON( + ctx, + status, + receivingAccount, + ) + // Check message in home stream. suite.checkStreamed( homeStream, @@ -654,11 +659,6 @@ func (suite *FromClientAPITestSuite) TestProcessCreateStatusBoost() { nil, suite.testStatuses["local_account_2_status_1"], ) - statusJSON = suite.statusJSON( - ctx, - status, - receivingAccount, - ) ) // Process the new status. @@ -674,6 +674,12 @@ func (suite *FromClientAPITestSuite) TestProcessCreateStatusBoost() { suite.FailNow(err.Error()) } + statusJSON := suite.statusJSON( + ctx, + status, + receivingAccount, + ) + // Check message in home stream. suite.checkStreamed( homeStream, |