blob: 504d1fe5e2ab613f2fe570d8d477c8270709cf62 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
|
#!/usr/bin/env ruby
require File.expand_path(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
|