summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authordanielsdeleo <dan@opscode.com>2013-10-18 11:58:57 -0700
committerdanielsdeleo <dan@opscode.com>2013-10-18 11:58:57 -0700
commit1fd6feb2cd43203b4327318a4a101993ed9c02d9 (patch)
tree4b3f8b50e4f27ad6ccc9fa9173230c18d114360c
parenta8eabfdc15547203e2c326680752e67c17c430a9 (diff)
downloadchef-1fd6feb2cd43203b4327318a4a101993ed9c02d9.tar.gz
Mark popen4 tests "volatile" to prevent spurious Ci failures
-rw-r--r--lib/chef/mixin/command.rb20
-rw-r--r--spec/unit/mixin/command_spec.rb2
2 files changed, 21 insertions, 1 deletions
diff --git a/lib/chef/mixin/command.rb b/lib/chef/mixin/command.rb
index 2cc25e149e..fb75980f8f 100644
--- a/lib/chef/mixin/command.rb
+++ b/lib/chef/mixin/command.rb
@@ -24,6 +24,26 @@ require 'etc'
class Chef
module Mixin
+
+ #!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
+ # NOTE:
+ # The popen4 method upon which all the code here is based has a race
+ # condition where it may fail to read all of the data written to stdout and
+ # stderr after the child process exits. The tests for the code here
+ # occasionally fail because of this race condition, so they have been
+ # tagged "volatile".
+ #
+ # This code is considered deprecated, so it should not need to be modified
+ # frequently, if at all. HOWEVER, if you do modify the code here, you must
+ # explicitly enable volatile tests:
+ #
+ # bundle exec rspec spec/unit/mixin/command_spec.rb -t volatile
+ #
+ # In addition, you should make a note that tests need to be run with
+ # volatile tests enabled on any pull request or bug report you submit with
+ # your patch.
+ #!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
+
module Command
extend self
diff --git a/spec/unit/mixin/command_spec.rb b/spec/unit/mixin/command_spec.rb
index e143b8728b..a2a2fef461 100644
--- a/spec/unit/mixin/command_spec.rb
+++ b/spec/unit/mixin/command_spec.rb
@@ -18,7 +18,7 @@
require 'spec_helper'
-describe Chef::Mixin::Command do
+describe Chef::Mixin::Command, :volatile do
if windows?