Just to check about a suspicion about why the tests fail:
the test User is being deleted immeidately after this returns,
while the thread saving attachments may still be working.
IRL, this condition would not occur, but just to confirm,
introducing an artificial pause for letting the attachment
saving thread to finish.