title: testng dataprovider and iretrylistener data issue
body: <p>I've faced with an issue when my failed tests are getting retried using new test data (not original data from dataprovider). If I missed the appropriate existing topic feel free to point me on a right way.</p>
  
  <p>I've found out that dataprovider method is being retried also in case test method failed. How could I rerun test method only (with original test data)?</p>
  
  <p>Thanks in advance for Your help.</p>
  
  <p>Here are some parts of my code:</p>
  
  <p>Test class:</p>
  
  <pre><code>@Listeners({RetryTestListener.class})
  public class MyClassTest extends FunctionalTest {
  
  private boolean counter = true;
  
  @BeforeTest(alwaysRun = true)
  public void beforeTest(ITestContext context) {
      for (ITestNGMethod method : context.getAllTestMethods()) {                             
                              if(Arrays.asList(method.getGroups()).contains("expectedDataFromUpstream"))      {
          method.setRetryAnalyzer(new MyClassTest());
      }
  }
   }
  
   @Test(enabled = true, groups = {"expectedDataFromUpstream"},      dataProviderClass =  dataProvider="dataProvider")
   public void testWithRerun(boolean flag1, boolean flag2) {        
        if(counter) {
           counter = false;
           stepHelper().assertThat("Fail result", true,   Matchers.equalTo(false));
        } else {
            counter = true;
            stepHelper().assertThat("Pass result", true, Matchers.equalTo(true));
      }
   }    
   @DataProvider(name="dataProvider")
   public Object[][] dataProvider(Method method) {
        return new Object[][] { { getRandomBoolean(), getRandomBoolean() }, { getRandomBoolean(), getRandomBoolean() }, { getRandomBoolean(), getRandomBoolean() }};
   }
  
   public boolean getRandomBoolean() {
        return Math.random() &lt; 0.5;
   }   
  }
  </code></pre>
  
  <p>RetryTestListener :</p>
  
  <pre><code> public class RetryTestListener extends TestListenerAdapter {
  
   @Override
   public void onTestSuccess(ITestResult result) {
       if (result.getMethod().getRetryAnalyzer() != null) {
      FunctionalTest retryAnalyzer = (FunctionalTest)result.getMethod().getRetryAnalyzer();
      retryAnalyzer.setDefaultCurrentCounterValue();
       }
   }
  
   @Override
   public void onTestFailure(ITestResult result) {
       if (result.getMethod().getRetryAnalyzer() != null) {
      FunctionalTest retryAnalyzer = (FunctionalTest)result.getMethod().getRetryAnalyzer();
  
      if(retryAnalyzer.isRetryAvailable()) {
          result.setStatus(ITestResult.SKIP);
      } else {
          result.setStatus(ITestResult.FAILURE);
      }
      Reporter.setCurrentTestResult(result);
   }
   }
   }
  </code></pre>
  
  <p>IRetryAnalyzer:</p>
  
  <pre><code> public abstract class FunctionalTest extends BaseFunctionalTest implements IRetryAnalyzer {
  
   private static int currentCounterValue = 1;
  
   public boolean isRetryAvailable() {
       return currentCounterValue % 2 != 0;
   }
  
   public void setDefaultCurrentCounterValue() {
       currentCounterValue = 1;
   }
  
   @Override
   public boolean retry(ITestResult result) {
       if (isRetryAvailable()) {
            currentCounterValue++;
            return true;
       }
       setDefaultCurrentCounterValue();
       return false;
   }
  
   .....
   }
  </code></pre>