diff options
author | Jay Mundrawala <jdmundrawala@gmail.com> | 2014-10-16 13:03:31 -0700 |
---|---|---|
committer | Jay Mundrawala <jdmundrawala@gmail.com> | 2014-10-16 13:08:34 -0700 |
commit | 2de11288b6480e8c98551e37d1b688e482a760e0 (patch) | |
tree | c7f6ff4fb038525513b51bb8f25586c515b74c38 | |
parent | 87ebd29a5632d4a2598b12b99ecc9d2ee2b4586f (diff) | |
download | chef-2de11288b6480e8c98551e37d1b688e482a760e0.tar.gz |
Retry delete env
-rwxr-xr-x | spec/functional/resource/env_spec.rb | 13 |
1 files changed, 9 insertions, 4 deletions
diff --git a/spec/functional/resource/env_spec.rb b/spec/functional/resource/env_spec.rb index cf77fef703..3f857c2c50 100755 --- a/spec/functional/resource/env_spec.rb +++ b/spec/functional/resource/env_spec.rb @@ -38,10 +38,15 @@ describe Chef::Resource::Env, :windows_only do } before(:each) do - resource_lower = Chef::Resource::Env.new(chef_env_test_lower_case, test_run_context) - resource_lower.run_action(:delete) - resource_mixed = Chef::Resource::Env.new(chef_env_test_mixed_case, test_run_context) - resource_mixed.run_action(:delete) + for i in 1..3 + resource_lower = Chef::Resource::Env.new(chef_env_test_lower_case, test_run_context) + resource_lower.run_action(:delete) + resource_mixed = Chef::Resource::Env.new(chef_env_test_mixed_case, test_run_context) + resource_mixed.run_action(:delete) + if ENV[chef_env_test_lower_case] || ENV[chef_env_test_mixed_case] + sleep 10 + end + end end context "when the create action is invoked" do |