dumping ground for random patches and texts
 help / color / mirror / Atom feed
* [PATCH] test_watcher: disable test correctly when aggregate is missing
@ 2017-03-15 23:39 Eric Wong
  0 siblings, 0 replies; only message in thread
From: Eric Wong @ 2017-03-15 23:39 UTC (permalink / raw)
  To: spew

Oops :x
---
 test/test_aggregate_pmq.rb          | 2 +-
 test/test_last_data_recv_unicorn.rb | 2 +-
 test/test_watcher.rb                | 7 ++++++-
 3 files changed, 8 insertions(+), 3 deletions(-)

diff --git a/test/test_aggregate_pmq.rb b/test/test_aggregate_pmq.rb
index 7748b4f..692b9bd 100644
--- a/test/test_aggregate_pmq.rb
+++ b/test/test_aggregate_pmq.rb
@@ -3,7 +3,7 @@
 pmq = begin
   Raindrops::Aggregate::PMQ
 rescue LoadError => e
-  warn "W: #{e} skipping test"
+  warn "W: #{e} skipping #{__FILE__}"
   false
 end
 if RUBY_VERSION.to_f < 1.9
diff --git a/test/test_last_data_recv_unicorn.rb b/test/test_last_data_recv_unicorn.rb
index ca48715..60d1be9 100644
--- a/test/test_last_data_recv_unicorn.rb
+++ b/test/test_last_data_recv_unicorn.rb
@@ -7,7 +7,7 @@
 pmq = begin
   Raindrops::Aggregate::PMQ
 rescue LoadError => e
-  warn "W: #{e} skipping test"
+  warn "W: #{e} skipping #{__FILE__}"
   false
 end
 if RUBY_VERSION.to_f < 1.9
diff --git a/test/test_watcher.rb b/test/test_watcher.rb
index 70e8e75..d1e4d15 100644
--- a/test/test_watcher.rb
+++ b/test/test_watcher.rb
@@ -2,6 +2,11 @@
 require "test/unit"
 require "rack"
 require "raindrops"
+begin
+  require 'aggregate'
+rescue LoadError => e
+  warn "W: #{e} skipping #{__FILE__}"
+end
 
 class TestWatcher < Test::Unit::TestCase
   TEST_ADDR = ENV['UNICORN_TEST_ADDR'] || '127.0.0.1'
@@ -178,4 +183,4 @@ def test_peaks
     assert_equal queued_before, headers["X-Last-Peak-At"], "should not change"
     assert_equal start, headers["X-First-Peak-At"]
   end
-end if RUBY_PLATFORM =~ /linux/
+end if RUBY_PLATFORM =~ /linux/ && defined?(Aggregate)
-- 
EW


^ permalink raw reply related	[flat|nested] only message in thread

only message in thread, other threads:[~2017-03-15 23:39 UTC | newest]

Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2017-03-15 23:39 [PATCH] test_watcher: disable test correctly when aggregate is missing Eric Wong

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).