about summary refs log tree commit homepage
path: root/test/test_backend.rb
diff options
context:
space:
mode:
Diffstat (limited to 'test/test_backend.rb')
-rw-r--r--test/test_backend.rb8
1 files changed, 8 insertions, 0 deletions
diff --git a/test/test_backend.rb b/test/test_backend.rb
index cc8d3a7..aced57c 100644
--- a/test/test_backend.rb
+++ b/test/test_backend.rb
@@ -229,5 +229,13 @@ class TestBackend < Test::Unit::TestCase
     assert_equal expected, actual
   end
 
+  def test_fail_timeout
+    o = { :domain => "none", :hosts => %w(0:666 0:6 0:66) }
+    c = MogileFS::MogileFS.new(o)
+    assert_equal 5, c.backend.instance_variable_get(:@fail_timeout)
+    o[:fail_timeout] = 0.666
+    c = MogileFS::MogileFS.new(o)
+    assert_equal 0.666, c.backend.instance_variable_get(:@fail_timeout)
+  end
 end