public
Rubygem
Description: Don't mind this, go to http://github.com/integrity/integrity
Homepage: http://integrityapp.com
Clone URL: git://github.com/foca/integrity.git
log time out of notifiers
sr (author)
Fri Nov 21 14:09:26 -0800 2008
commit  6cc92bfc9712440ed45e3630c081fb3e776ace6b
tree    954aa3fae448c25783857dd93a7a278a3046bfe1
parent  88f7e1f484bdb933d306efcea60d34107d834eb6
...
80
81
82
 
83
84
85
...
80
81
82
83
84
85
86
0
@@ -80,6 +80,7 @@ module Integrity
0
           begin
0
             notifier.notify_of_build last_build
0
           rescue Timeout::Error
0
+            Integrity.logger.info "#{notifier.name} notifier timed out"
0
             next
0
           end
0
         end
...
273
274
275
 
276
277
278
279
280
 
 
 
 
 
 
281
282
...
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
0
@@ -273,10 +273,17 @@ describe Integrity::Project do
0
     end
0
 
0
     it "should protect itself from eventual timeout error" do
0
+      Integrity.logger.stub!(:info)
0
       @email_notifier.stub!(:notify_of_build).and_raise(Timeout::Error)
0
       lambda do
0
         @project.send(:send_notifications)
0
       end.should_not raise_error
0
     end
0
+
0
+    it "should log timeout" do
0
+      @email_notifier.stub!(:notify_of_build).and_raise(Timeout::Error)
0
+      Integrity.logger.should_receive(:info).with("Email notifier timed out")
0
+      @project.send(:send_notifications)
0
+    end
0
   end
0
 end

Comments