summaryrefslogtreecommitdiff
path: root/internal/processing/account_test.go
diff options
context:
space:
mode:
Diffstat (limited to 'internal/processing/account_test.go')
-rw-r--r--internal/processing/account_test.go11
1 files changed, 9 insertions, 2 deletions
diff --git a/internal/processing/account_test.go b/internal/processing/account_test.go
index 3fd7d83f4..b34358ba1 100644
--- a/internal/processing/account_test.go
+++ b/internal/processing/account_test.go
@@ -57,10 +57,14 @@ func (suite *AccountTestSuite) TestAccountDeleteLocal() {
DeleteOriginID: deletingAccount.ID,
})
suite.NoError(errWithCode)
- time.Sleep(1 * time.Second) // wait a sec for the delete to process
// the delete should be federated outwards to the following account's inbox
- sent, ok := suite.httpClient.SentMessages[followingAccount.InboxURI]
+ var sent []byte
+ var ok bool
+ for !ok {
+ sent, ok = suite.httpClient.SentMessages[followingAccount.InboxURI]
+ }
+
suite.True(ok)
delete := &struct {
Actor string `json:"actor"`
@@ -79,6 +83,9 @@ func (suite *AccountTestSuite) TestAccountDeleteLocal() {
suite.Equal(pub.PublicActivityPubIRI, delete.CC)
suite.Equal("Delete", delete.Type)
+ // wait for the delete to go through
+ time.Sleep(1 * time.Second)
+
// the deleted account should be deleted
dbAccount, err := suite.db.GetAccountByID(ctx, deletingAccount.ID)
suite.NoError(err)