gridinit-jmeter 1.0.1.pre → 1.0.2.pre

Sign up to get free protection for your applications and to get access to all the features.
@@ -6,7 +6,7 @@ test do
6
6
 
7
7
  think_time 5000,5000
8
8
 
9
- throughput_controller percent: 100 do
9
+ throughput_controller percent: 99 do
10
10
  transaction name: "TC_01", parent: true, include_timers: true
11
11
  end
12
12
 
@@ -182,7 +182,11 @@ module Gridinit
182
182
  def throughput_controller(params, &block)
183
183
  params[:style] = 1 if params[:percent]
184
184
  params[:maxThroughput] = params[:total] || params[:percent] || 1
185
- super
185
+
186
+ node = Gridinit::Jmeter::ThroughputController.new(params)
187
+ node.doc.xpath(".//FloatProperty/value").first.content = params[:maxThroughput].to_f
188
+
189
+ attach_node(node, &block)
186
190
  end
187
191
 
188
192
  alias_method :Throughput, :throughput_controller
@@ -1,5 +1,5 @@
1
1
  module Gridinit
2
2
  module Jmeter
3
- VERSION = "1.0.1.pre"
3
+ VERSION = "1.0.2.pre"
4
4
  end
5
5
  end
data/spec/dsl_spec.rb CHANGED
@@ -129,7 +129,7 @@ describe "DSL" do
129
129
  let(:doc) do
130
130
  test do
131
131
  threads do
132
- throughput_controller percent: 100 do
132
+ throughput_controller percent: 99 do
133
133
  transaction name: "TC_01", parent: true, include_timers: true
134
134
  end
135
135
  end
@@ -140,7 +140,8 @@ describe "DSL" do
140
140
 
141
141
  it 'should match on maxThroughput' do
142
142
  # puts doc.to_xml indent: 2
143
- fragment.search(".//intProp[@name='ThroughputController.maxThroughput']").text.should == '100'
143
+ fragment.search(".//intProp[@name='ThroughputController.maxThroughput']").text.should == '99'
144
+ fragment.search(".//FloatProperty/value").text.should == '99.0'
144
145
  end
145
146
 
146
147
  it 'should match on style' do
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: gridinit-jmeter
3
3
  version: !ruby/object:Gem::Version
4
- version: 1.0.1.pre
4
+ version: 1.0.2.pre
5
5
  prerelease: 6
6
6
  platform: ruby
7
7
  authors: