You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@buildr.apache.org by do...@apache.org on 2013/10/10 13:26:30 UTC

svn commit: r1530921 - in /buildr/trunk: buildr.gemspec spec/core/cc_spec.rb spec/java/tests_spec.rb spec/sandbox.rb

Author: donaldp
Date: Thu Oct 10 11:26:29 2013
New Revision: 1530921

URL: http://svn.apache.org/r1530921
Log:
Make use of rspec-retry to try and avoid the impact of the intermittent errors

Modified:
    buildr/trunk/buildr.gemspec
    buildr/trunk/spec/core/cc_spec.rb
    buildr/trunk/spec/java/tests_spec.rb
    buildr/trunk/spec/sandbox.rb

Modified: buildr/trunk/buildr.gemspec
URL: http://svn.apache.org/viewvc/buildr/trunk/buildr.gemspec?rev=1530921&r1=1530920&r2=1530921&view=diff
==============================================================================
--- buildr/trunk/buildr.gemspec (original)
+++ buildr/trunk/buildr.gemspec Thu Oct 10 11:26:29 2013
@@ -84,6 +84,7 @@ for those one-off tasks, with a language
     spec.add_development_dependency 'rdoc', '4.0.1'
   end
 
+  spec.add_development_dependency 'rspec-retry', '0.2.1'
   spec.add_development_dependency 'ci_reporter', '1.9.0'
   # Ideally we would depend on psych when the platform has >= 1.9.2 support and jruby platform version > 1.6.6
   #spec.add_development_dependency 'psych' if RUBY_VERSION >= '1.9.2'

Modified: buildr/trunk/spec/core/cc_spec.rb
URL: http://svn.apache.org/viewvc/buildr/trunk/spec/core/cc_spec.rb?rev=1530921&r1=1530920&r2=1530921&view=diff
==============================================================================
--- buildr/trunk/spec/core/cc_spec.rb (original)
+++ buildr/trunk/spec/core/cc_spec.rb Thu Oct 10 11:26:29 2013
@@ -113,7 +113,8 @@ describe Buildr::CCTask do
     thread.exit
   end
 
-  it 'should support subprojects' do |spec|
+  # Not sure why this intermittently fails
+  it 'should support subprojects', :retry => 3 do |spec|
     write 'foo/src/main/java/Example.java', "public class Example {}"
     write 'foo/src/test/java/ExampleTest.java', "public class ExampleTest {}"
 

Modified: buildr/trunk/spec/java/tests_spec.rb
URL: http://svn.apache.org/viewvc/buildr/trunk/spec/java/tests_spec.rb?rev=1530921&r1=1530920&r2=1530921&view=diff
==============================================================================
--- buildr/trunk/spec/java/tests_spec.rb (original)
+++ buildr/trunk/spec/java/tests_spec.rb Thu Oct 10 11:26:29 2013
@@ -308,7 +308,8 @@ describe Buildr::JUnit, 'report' do
     lambda { task('junit:report').invoke }.should change { File.exist?(JUnit.report.target) }.to(true)
   end
 
-  it 'should clean after itself' do
+  # for some reason this will intermittently fail under windows
+  it 'should clean after itself', :retry => (Buildr::Util.win_os? ? 4 : 1) do
     mkpath JUnit.report.target
     lambda { task('clean').invoke }.should change { File.exist?(JUnit.report.target) }.to(false)
   end

Modified: buildr/trunk/spec/sandbox.rb
URL: http://svn.apache.org/viewvc/buildr/trunk/spec/sandbox.rb?rev=1530921&r1=1530920&r2=1530921&view=diff
==============================================================================
--- buildr/trunk/spec/sandbox.rb (original)
+++ buildr/trunk/spec/sandbox.rb Thu Oct 10 11:26:29 2013
@@ -28,6 +28,11 @@ module Buildr::Scala
 end
 Buildr.settings.build['scala.version'] = Buildr::Scala::SCALA_VERSION_FOR_SPECS
 
+require 'rspec/retry'
+RSpec.configure do |config|
+  config.verbose_retry = true # show retry status in spec process
+end
+
 # Add a 'require' here only for optional extensions, not for extensions that should be loaded by default.
 require 'buildr/clojure'
 require 'buildr/groovy'