diff options
author | Eric Wong <normalperson@yhbt.net> | 2008-12-24 00:13:48 -0800 |
---|---|---|
committer | Eric Wong <normalperson@yhbt.net> | 2008-12-24 00:13:48 -0800 |
commit | 28aab06e493363b143476d44ec3d39e8403cd28e (patch) | |
tree | bf14f3c2ae9f1ba346a803b7e37a4acbd928d530 | |
parent | e6ff1c564a5420d7ea855fc7312caaa9e280f921 (diff) | |
download | mogilefs-client-28aab06e493363b143476d44ec3d39e8403cd28e.tar.gz |
This way tests can run quicker by default but we can still use larger ones to test things.
-rw-r--r-- | test/test_mogilefs.rb | 11 |
1 files changed, 9 insertions, 2 deletions
diff --git a/test/test_mogilefs.rb b/test/test_mogilefs.rb index b884fda..e8e96c6 100644 --- a/test/test_mogilefs.rb +++ b/test/test_mogilefs.rb @@ -46,7 +46,7 @@ class TestMogileFS__MogileFS < TestMogileFS def test_get_file_data_http_block tmpfp = Tempfile.new('test_mogilefs.open_data') - nr = 100 # tested with 1000 + nr = nr_chunks chunk_size = 1024 * 1024 expect_size = nr * chunk_size header = "HTTP/1.0 200 OK\r\n" \ @@ -337,7 +337,7 @@ class TestMogileFS__MogileFS < TestMogileFS to_put = Tempfile.new('test_mogilefs.to_put') received = Tempfile.new('test_mogilefs.received') - nr = 10 # tested with 1000 + nr = nr_chunks chunk_size = 1024 * 1024 expect_size = nr * chunk_size @@ -442,5 +442,12 @@ class TestMogileFS__MogileFS < TestMogileFS end end + private + + # tested with 1000, though it takes a while + def nr_chunks + ENV['NR_CHUNKS'] ? ENV['NR_CHUNKS'].to_i : 10 + end + end |