From 5a93f2d29c96e649440101f2d1ca28247631b59e Mon Sep 17 00:00:00 2001 From: Azul Date: Sat, 24 Sep 2016 12:00:56 +0200 Subject: use plain http.rb rather than celluloid i/o Turns out http.rb does not support celluloid i/o andymore and we were not making use of it anyway. Here's what https://github.com/httprb/http/wiki/Thread-Safety says: (NOTE: this gem previously supported Celluloid::IO, but that support was removed to add the current timeout backend. It may be added back in a future version) So now we have a plain http.rb adapter and use that as the default. This prevents actors from crashing in the adapter (as we don't have any). --- test/support/http_stub_helper.rb | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'test/support') diff --git a/test/support/http_stub_helper.rb b/test/support/http_stub_helper.rb index cb9b578..808fd01 100644 --- a/test/support/http_stub_helper.rb +++ b/test/support/http_stub_helper.rb @@ -1,7 +1,7 @@ module HttpStubHelper def stubbing_http - Nickserver::Adapters::CelluloidHttp.stub :new, adapter do + Nickserver::Adapters::Http.stub :new, adapter do yield end adapter.verify -- cgit v1.2.3 From ab31d9ca7dca20c873a7240482d1736d0f6b6dae Mon Sep 17 00:00:00 2001 From: Azul Date: Fri, 30 Sep 2016 12:47:32 +0200 Subject: change default adapter to CelluloidHttp Turns out without this nickserver will not respond to multiple concurrent requests. --- test/support/http_stub_helper.rb | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) (limited to 'test/support') diff --git a/test/support/http_stub_helper.rb b/test/support/http_stub_helper.rb index 808fd01..dd3d1b2 100644 --- a/test/support/http_stub_helper.rb +++ b/test/support/http_stub_helper.rb @@ -1,7 +1,9 @@ +require 'nickserver/source' + module HttpStubHelper def stubbing_http - Nickserver::Adapters::Http.stub :new, adapter do + Nickserver::Source::DEFAULT_ADAPTER_CLASS.stub :new, adapter do yield end adapter.verify -- cgit v1.2.3 From 5967c4a568aff2c5e73e3ab933aa68d25387aeb1 Mon Sep 17 00:00:00 2001 From: Azul Date: Sun, 2 Oct 2016 15:05:02 +0200 Subject: silence Celluloid.logger in tests Introduced CelluloidTest as a test class for all tests that depend on Celluloid being up and running. --- test/support/celluloid_test.rb | 14 ++++++++++++++ test/support/client_integration_test.rb | 13 ------------- 2 files changed, 14 insertions(+), 13 deletions(-) create mode 100644 test/support/celluloid_test.rb delete mode 100644 test/support/client_integration_test.rb (limited to 'test/support') diff --git a/test/support/celluloid_test.rb b/test/support/celluloid_test.rb new file mode 100644 index 0000000..ddcfcbb --- /dev/null +++ b/test/support/celluloid_test.rb @@ -0,0 +1,14 @@ +class CelluloidTest < Minitest::Test + + def setup + super + Celluloid.boot + Celluloid.logger = nil + end + + def teardown + Celluloid.shutdown + super + end + +end diff --git a/test/support/client_integration_test.rb b/test/support/client_integration_test.rb deleted file mode 100644 index b05db73..0000000 --- a/test/support/client_integration_test.rb +++ /dev/null @@ -1,13 +0,0 @@ -class ClientIntegrationTest - - def setup - super - Celluloid.boot - end - - def teardown - Celluloid.shutdown - super - end - -end -- cgit v1.2.3