title: Jmeter Groovy global variable behaviour
body: <p>I have written a script in Jmeter as below:</p>
  
  <pre><code>vars.put("status","0");
  if(vars.get("status") == "1"){
      __setProperty(totalAmount, ""+ (Integer.parseInt(${__property(totalAmount)}) + 150))};
  }
  else{    
      AssertionResult.setFailureMessage("incorrect status");
      AssertionResult.setFailure(true);
  }
  </code></pre>
  
  <p>totalAmount is global variable. Even though status is set to 0 it is incrementing the total amount by 150.
  What could be the issue? Please help. I am new to Jmeter &amp; Groovy.</p>