Revert "DEV: Patch Net::BufferedIO to help debug spec flakes (#1375)" (#1403)

This reverts commit ca78b1a1c588bd8708418bc42855837aafc6ab15.

Problem resolved by https://github.com/discourse/discourse-perspective-api/pull/110
This commit is contained in:
David Taylor 2025-06-04 14:13:45 +01:00 committed by GitHub
parent 2842295b10
commit cab39839fd
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194

View File

@ -1,25 +1,5 @@
# frozen_string_literal: true
# Debugging https://github.com/ruby/net-protocol/issues/32
# which seems to be happening inconsistently in CI
Net::BufferedIO.prepend(
Module.new do
def initialize(*args, **kwargs)
if kwargs[:debug_output] && !kwargs[:debug_output].respond_to(:<<)
raise ArgumentError, "debug_output must support <<"
end
super
end
def debug_output=(debug_output)
if debug_output && !debug_output.respond_to?(:<<)
raise ArgumentError, "debug_output must support <<"
end
super
end
end,
)
describe DiscourseAi::Completions::CancelManager do
fab!(:model) { Fabricate(:anthropic_model, name: "test-model") }