diff options
Diffstat (limited to 'test/fresh.rb')
-rw-r--r-- | test/fresh.rb | 8 |
1 files changed, 6 insertions, 2 deletions
diff --git a/test/fresh.rb b/test/fresh.rb index 4db1e2c..e614b7d 100644 --- a/test/fresh.rb +++ b/test/fresh.rb @@ -39,8 +39,7 @@ EOF @trackers = @hosts = [ "#@test_host:#@tracker_port" ] @tracker.close - x!("mogilefsd", "--daemon", "--config=#{@mogilefsd_conf.path}") - wait_for_port @tracker_port + start_tracker @admin = MogileFS::Admin.new(:hosts => @hosts) 50.times do break if File.size(@mogstored_pid.path) > 0 @@ -48,6 +47,11 @@ EOF end end + def start_tracker + x!("mogilefsd", "--daemon", "--config=#{@mogilefsd_conf.path}") + wait_for_port @tracker_port + end + def wait_for_port(port) tries = 50 begin |