From e37845cd351d0d9cbdae469b75a532edbaa3c0ed Mon Sep 17 00:00:00 2001 From: Mark Felder Date: Sun, 16 Jun 2024 16:26:24 -0400 Subject: Stale user refreshing should be done async to prevent blocking of rendering activities --- test/pleroma/user_test.exs | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) (limited to 'test') diff --git a/test/pleroma/user_test.exs b/test/pleroma/user_test.exs index 5b7a65658..0da9969d0 100644 --- a/test/pleroma/user_test.exs +++ b/test/pleroma/user_test.exs @@ -953,9 +953,12 @@ defmodule Pleroma.UserTest do {:ok, user} = User.get_or_fetch_by_ap_id("http://mastodon.example.org/users/admin") - assert user.inbox + # User was updated async, fetch from cache now + updated_user = User.get_cached_by_ap_id(user.ap_id) + + assert updated_user.inbox - refute user.last_refreshed_at == orig_user.last_refreshed_at + refute updated_user.last_refreshed_at == orig_user.last_refreshed_at end test "if nicknames clash, the old user gets a prefix with the old id to the nickname" do -- cgit v1.2.3