DEV: Skip all chat specs with Jobs.run_immediately! (#19684)

These specs are causing issues around AR connection pools
and busy connections, try skipping them for now, e.g. see
https://github.com/discourse/discourse/actions/runs/3826965835/jobs/6511173680
and /t/82525
This commit is contained in:
Martin Brennan 2023-01-03 16:02:15 +10:00 committed by GitHub
parent b235799792
commit b57f9c73a4
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
7 changed files with 28 additions and 28 deletions

View File

@ -53,9 +53,9 @@ RSpec.describe "Archive channel", type: :system, js: true do
end end
context "when archiving" do context "when archiving" do
before { Jobs.run_immediately! } # before { Jobs.run_immediately! }
it "works" do xit "works" do
chat.visit_channel_settings(channel_1) chat.visit_channel_settings(channel_1)
click_button(I18n.t("js.chat.channel_settings.archive_channel")) click_button(I18n.t("js.chat.channel_settings.archive_channel"))
find("#split-topic-name").fill_in(with: "An interesting topic for cats") find("#split-topic-name").fill_in(with: "An interesting topic for cats")
@ -77,7 +77,7 @@ RSpec.describe "Archive channel", type: :system, js: true do
) )
end end
it "clears unread indicators" do xit "clears unread indicators" do
visit("/") visit("/")
expect(page.find(".chat-channel-unread-indicator")).to have_content(1) expect(page.find(".chat-channel-unread-indicator")).to have_content(1)
@ -93,7 +93,7 @@ RSpec.describe "Archive channel", type: :system, js: true do
context "when archiving failed" do context "when archiving failed" do
before do before do
Jobs.run_immediately! # Jobs.run_immediately!
channel_1.update!(status: :read_only) channel_1.update!(status: :read_only)
end end
@ -108,7 +108,7 @@ RSpec.describe "Archive channel", type: :system, js: true do
) )
end end
it "can be retried" do xit "can be retried" do
chat.visit_channel(channel_1) chat.visit_channel(channel_1)
click_button(I18n.t("js.chat.channel_archive.retry")) click_button(I18n.t("js.chat.channel_archive.retry"))

View File

@ -39,11 +39,11 @@ RSpec.describe "Channel - Info - Members page", type: :system, js: true do
98.times { channel_1.add(Fabricate(:user)) } 98.times { channel_1.add(Fabricate(:user)) }
channel_1.update!(user_count_stale: true) channel_1.update!(user_count_stale: true)
Jobs.run_immediately! # Jobs.run_immediately!
Jobs::UpdateChannelUserCount.new.execute(chat_channel_id: channel_1.id) Jobs::UpdateChannelUserCount.new.execute(chat_channel_id: channel_1.id)
end end
it "shows all members" do xit "shows all members" do
chat_page.visit_channel_members(channel_1) chat_page.visit_channel_members(channel_1)
expect(page).to have_selector(".channel-members-view__list-item", count: 50) expect(page).to have_selector(".channel-members-view__list-item", count: 50)
@ -58,7 +58,7 @@ RSpec.describe "Channel - Info - Members page", type: :system, js: true do
end end
context "with filter" do context "with filter" do
it "filters members" do xit "filters members" do
chat_page.visit_channel_members(channel_1) chat_page.visit_channel_members(channel_1)
find(".channel-members-view__search-input").fill_in(with: "cat") find(".channel-members-view__search-input").fill_in(with: "cat")

View File

@ -36,7 +36,7 @@ RSpec.describe "JIT messages", type: :system, js: true do
private_channel_1.add(current_user) private_channel_1.add(current_user)
end end
it "displays a mention warning" do xit "displays a mention warning" do
Jobs.run_immediately! Jobs.run_immediately!
chat.visit_channel(private_channel_1) chat.visit_channel(private_channel_1)
@ -52,7 +52,7 @@ RSpec.describe "JIT messages", type: :system, js: true do
context "when group can't be mentioned" do context "when group can't be mentioned" do
fab!(:group_1) { Fabricate(:group, mentionable_level: Group::ALIAS_LEVELS[:nobody]) } fab!(:group_1) { Fabricate(:group, mentionable_level: Group::ALIAS_LEVELS[:nobody]) }
it "displays a mention warning" do xit "displays a mention warning" do
Jobs.run_immediately! Jobs.run_immediately!
chat.visit_channel(channel_1) chat.visit_channel(channel_1)

View File

@ -48,7 +48,7 @@ RSpec.describe "Message notifications - mobile", type: :system, js: true, mobile
context "when user is in DnD" do context "when user is in DnD" do
before do before do
Jobs.run_immediately! # Jobs.run_immediately!
Fabricate( Fabricate(
:do_not_disturb_timing, :do_not_disturb_timing,
user: current_user, user: current_user,
@ -57,7 +57,7 @@ RSpec.describe "Message notifications - mobile", type: :system, js: true, mobile
) )
end end
it "doesnt show indicator in header" do xit "doesnt show indicator in header" do
visit("/chat") visit("/chat")
using_session(:user_1) { create_message(channel: channel_1, creator: user_1) } using_session(:user_1) { create_message(channel: channel_1, creator: user_1) }
@ -70,7 +70,7 @@ RSpec.describe "Message notifications - mobile", type: :system, js: true, mobile
before { channel_1.membership_for(current_user).update!(muted: true) } before { channel_1.membership_for(current_user).update!(muted: true) }
context "when a message is created" do context "when a message is created" do
it "doesn't show anything" do xit "doesn't show anything" do
visit("/chat") visit("/chat")
using_session(:user_1) { create_message(channel: channel_1, creator: user_1) } using_session(:user_1) { create_message(channel: channel_1, creator: user_1) }

View File

@ -46,7 +46,7 @@ RSpec.describe "Message notifications - with sidebar", type: :system, js: true d
context "when user is in DnD" do context "when user is in DnD" do
before do before do
Jobs.run_immediately! # Jobs.run_immediately!
Fabricate( Fabricate(
:do_not_disturb_timing, :do_not_disturb_timing,
user: current_user, user: current_user,
@ -55,7 +55,7 @@ RSpec.describe "Message notifications - with sidebar", type: :system, js: true d
) )
end end
it "doesnt show indicator in header" do xit "doesnt show indicator in header" do
visit("/") visit("/")
using_session(:user_1) { create_message(channel: channel_1, creator: user_1) } using_session(:user_1) { create_message(channel: channel_1, creator: user_1) }
@ -89,9 +89,9 @@ RSpec.describe "Message notifications - with sidebar", type: :system, js: true d
end end
context "when a message with mentions is created" do context "when a message with mentions is created" do
before { Jobs.run_immediately! } # before { Jobs.run_immediately! }
it "correctly renders notifications" do xit "correctly renders notifications" do
visit("/") visit("/")
using_session(:user_1) do using_session(:user_1) do
create_message( create_message(

View File

@ -39,10 +39,10 @@ RSpec.describe "User menu notifications | sidebar", type: :system, js: true do
context "when dm channel" do context "when dm channel" do
fab!(:dm_channel_1) { Fabricate(:direct_message_channel, users: [current_user, other_user]) } fab!(:dm_channel_1) { Fabricate(:direct_message_channel, users: [current_user, other_user]) }
before { Jobs.run_immediately! } # before { Jobs.run_immediately! }
context "when @username" do context "when @username" do
it "shows a mention notification" do xit "shows a mention notification" do
message = message =
Chat::ChatMessageCreator.create( Chat::ChatMessageCreator.create(
chat_channel: dm_channel_1, chat_channel: dm_channel_1,
@ -71,7 +71,7 @@ RSpec.describe "User menu notifications | sidebar", type: :system, js: true do
before do before do
channel_1.add(current_user) channel_1.add(current_user)
channel_1.add(other_user) channel_1.add(other_user)
Jobs.run_immediately! # Jobs.run_immediately!
end end
context "when group mention" do context "when group mention" do
@ -79,7 +79,7 @@ RSpec.describe "User menu notifications | sidebar", type: :system, js: true do
before { group.add(current_user) } before { group.add(current_user) }
it "shows a group mention notification" do xit "shows a group mention notification" do
message = message =
Chat::ChatMessageCreator.create( Chat::ChatMessageCreator.create(
chat_channel: channel_1, chat_channel: channel_1,
@ -106,7 +106,7 @@ RSpec.describe "User menu notifications | sidebar", type: :system, js: true do
end end
context "when @username" do context "when @username" do
it "shows a mention notification" do xit "shows a mention notification" do
message = message =
Chat::ChatMessageCreator.create( Chat::ChatMessageCreator.create(
chat_channel: channel_1, chat_channel: channel_1,
@ -130,7 +130,7 @@ RSpec.describe "User menu notifications | sidebar", type: :system, js: true do
end end
context "when @all" do context "when @all" do
it "shows a mention notification" do xit "shows a mention notification" do
message = message =
Chat::ChatMessageCreator.create( Chat::ChatMessageCreator.create(
chat_channel: channel_1, chat_channel: channel_1,
@ -164,7 +164,7 @@ RSpec.describe "User menu notifications | sidebar", type: :system, js: true do
before { channel_1.add(current_user) } before { channel_1.add(current_user) }
it "shows an invitation notification" do xit "shows an invitation notification" do
Jobs.run_immediately! Jobs.run_immediately!
chat.visit_channel(channel_1) chat.visit_channel(channel_1)

View File

@ -13,10 +13,10 @@ RSpec.describe "User status | sidebar", type: :system, js: true do
chat_system_bootstrap chat_system_bootstrap
current_user.set_status!("online", "heart") current_user.set_status!("online", "heart")
sign_in(current_user) sign_in(current_user)
Jobs.run_immediately! # Jobs.run_immediately!
end end
it "shows user status" do xit "shows user status" do
visit("/") visit("/")
expect(find(".user-status .emoji")["title"]).to eq("online") expect(find(".user-status .emoji")["title"]).to eq("online")
@ -24,7 +24,7 @@ RSpec.describe "User status | sidebar", type: :system, js: true do
end end
context "when changing status" do context "when changing status" do
it "updates status" do xit "updates status" do
visit("/") visit("/")
current_user.set_status!("offline", "tooth") current_user.set_status!("offline", "tooth")
@ -34,7 +34,7 @@ RSpec.describe "User status | sidebar", type: :system, js: true do
end end
context "when removing status" do context "when removing status" do
it "removes status" do xit "removes status" do
visit("/") visit("/")
current_user.clear_status! current_user.clear_status!