summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--spec/functional/run_lock_spec.rb8
1 files changed, 7 insertions, 1 deletions
diff --git a/spec/functional/run_lock_spec.rb b/spec/functional/run_lock_spec.rb
index b6e192856b..eecdbbe6c8 100644
--- a/spec/functional/run_lock_spec.rb
+++ b/spec/functional/run_lock_spec.rb
@@ -1,6 +1,6 @@
#
# Author:: Daniel DeLeo (<dan@chef.io>)
-# Copyright:: Copyright 2012-2016, Chef Software, Inc.
+# Copyright:: Copyright 2012-2020, Chef Software Inc.
# License:: Apache License, Version 2.0
#
# Licensed under the Apache License, Version 2.0 (the "License");
@@ -404,6 +404,12 @@ describe Chef::RunLock do
example.log_event("#{name}.stop finished (pid #{pid} wasn't running)")
end
end
+
+ # close the IO.pipes so we don't leak them as open filehandles
+ @read_from_process.close rescue nil
+ @write_to_tests.close rescue nil
+ @read_from_tests.close rescue nil
+ @write_to_process.close rescue nil
end
def fire_event(event)