All Downloads are FREE. Search and download functionalities are using the official Maven repository.

net.snowflake.client.core.Incident2IT Maven / Gradle / Ivy

There is a newer version: 3.19.0
Show newest version
package net.snowflake.client.core;

import org.junit.Test;
import java.sql.SQLException;
import org.apache.commons.lang3.RandomStringUtils;
/**
 * Created by hyu on 6/7/16.
 */
public class Incident2IT extends BaseIncidentTest{
  // This tests should run against a new JVM process since
  // snowflake.throttle_duration can only be reset when JVM
  // started and use command line option
  // Use following command to run this tests:
  //    mvn -Dit.test=Incident2IT
  //        -Dsnowflake.throttle_duration=0
  //        -Dsnowflake.throttle_limit=10
  //        failsafe:integration-test
  // And use this command to all the rest tests
  //    mvn -Dit.test=\!Incident2IT
  //       failsafe:integration-test
  @Test
  public void testUnthrottleIncidentsInClientSide() throws SQLException
  {
    try {
      String signature = "testUnthrottleIncidentsInClientSide"
          + RandomStringUtils.randomAlphabetic(5);
      for (int i = 0; i < 8; i++) {
        generateIncidentWithSignature(signature, true);
      }
      verifyIncidentRegisteredInGS(signature, 8);
    }finally {
      System.clearProperty("snowflake.throttle_duration");
      System.clearProperty("snowflake.throttle_limit");
    }
  }
}




© 2015 - 2024 Weber Informatics LLC | Privacy Policy