From e06d9a2faba3d7fb8f278c7c4d904166e22dd824 Mon Sep 17 00:00:00 2001 From: Nick Gauthier Date: Tue, 16 Feb 2010 16:13:51 -0500 Subject: [PATCH] removed file sorting heuristic so users can sort their own files --- lib/hydra/master.rb | 1 - test/master_test.rb | 2 ++ 2 files changed, 2 insertions(+), 1 deletion(-) diff --git a/lib/hydra/master.rb b/lib/hydra/master.rb index 84ecbf7..1a03cbb 100644 --- a/lib/hydra/master.rb +++ b/lib/hydra/master.rb @@ -26,7 +26,6 @@ module Hydra #:nodoc: end @files = Array(opts.fetch('files') { nil }) raise "No files, nothing to do" if @files.empty? - @files.sort!{|a,b| File.size(b) <=> File.size(a)} # dumb heuristic @incomplete_files = @files.dup @workers = [] @listeners = [] diff --git a/test/master_test.rb b/test/master_test.rb index cc45b07..7671261 100644 --- a/test/master_test.rb +++ b/test/master_test.rb @@ -3,6 +3,8 @@ require File.join(File.dirname(__FILE__), 'test_helper') class MasterTest < Test::Unit::TestCase context "with a file to test and a destination to verify" do setup do + # avoid having other tests interfering with us + sleep(0.25) FileUtils.rm_f(target_file) end