DEV: cancel manager should bypass webmock (#1350)

Webmock can be a bit flaky under certain use cases.
This commit is contained in:
Sam 2025-05-20 13:01:55 +10:00 committed by GitHub
parent 7db2589cc4
commit af18603b21
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194

View File

@ -3,6 +3,8 @@
describe DiscourseAi::Completions::CancelManager do
fab!(:model) { Fabricate(:anthropic_model, name: "test-model") }
before { WebMock.allow_net_connect! }
it "can stop monitoring for cancellation cleanly" do
cancel_manager = DiscourseAi::Completions::CancelManager.new
cancel_manager.start_monitor(delay: 100) { false }