diff options
Diffstat (limited to 'spec/integration/parser/functions_spec.rb')
| -rw-r--r-- | spec/integration/parser/functions_spec.rb | 21 |
1 files changed, 21 insertions, 0 deletions
diff --git a/spec/integration/parser/functions_spec.rb b/spec/integration/parser/functions_spec.rb new file mode 100644 index 000000000..cbfb4ac88 --- /dev/null +++ b/spec/integration/parser/functions_spec.rb @@ -0,0 +1,21 @@ +#!/usr/bin/env ruby + +require File.dirname(__FILE__) + '/../../spec_helper' + +describe Puppet::Parser::Functions do + before :each do + Puppet::Parser::Functions.rmfunction("template") if Puppet::Parser::Functions.function("template") + end + + it "should support multiple threads autoloading the same function" do + threads = [] + lambda { + 10.times { |a| + threads << Thread.new { + Puppet::Parser::Functions.function("template") + } + } + }.should_not raise_error + threads.each { |t| t.join } + end +end
\ No newline at end of file |
