@Override
 @After
 public void tearDown() throws Exception {
   System.clearProperty("numShards");
   super.tearDown();
   resetExceptionIgnores();
 }
 @Before
 @Override
 public void setUp() throws Exception {
   super.setUp();
   System.setProperty("numShards", Integer.toString(sliceCount));
   System.setProperty("solr.xml.persist", "true");
   client = createCloudClient(null);
 }
 @Before
 @Override
 public void setUp() throws Exception {
   super.setUp();
   // can help to hide this when testing and looking at logs
   // ignoreException("shard update error");
   System.setProperty("numShards", Integer.toString(sliceCount));
   useFactory("solr.StandardDirectoryFactory");
 }
 @Override
 public void distribSetUp() throws Exception {
   // tlog gets deleted after node restarts if we use CachingDirectoryFactory.
   // make sure that tlog stays intact after we restart a node
   System.setProperty("solr.directoryFactory", "solr.StandardDirectoryFactory");
   System.setProperty("solr.ulog.numRecordsToKeep", "1000");
   System.setProperty("tests.zk.violationReportAction", LimitViolationAction.IGNORE.toString());
   super.distribSetUp();
 }
  @Override
  public void tearDown() throws Exception {
    super.tearDown();
    System.clearProperty("numShards");
    System.clearProperty("zkHost");
    System.clearProperty("solr.xml.persist");

    // insurance
    DirectUpdateHandler2.commitOnClose = true;
  }
  @Before
  @Override
  public void setUp() throws Exception {
    super.setUp();

    useJettyDataDir = false;

    System.setProperty("numShards", Integer.toString(sliceCount));
    System.setProperty("solr.xml.persist", "true");
  }
 @Override
 public void distribTearDown() throws Exception {
   if (!success) {
     printLayoutOnTearDown = true;
   }
   System.clearProperty("solr.directoryFactory");
   System.clearProperty("solr.ulog.numRecordsToKeep");
   System.clearProperty("tests.zk.violationReportAction");
   super.distribTearDown();
 }
  @Override
  public void doTest() throws Exception {
    testSolrJAPICalls();
    testNodesUsedByCreate();
    testCollectionsAPI();
    testCollectionsAPIAddRemoveStress();
    testErrorHandling();
    deletePartiallyCreatedCollection();
    deleteCollectionRemovesStaleZkCollectionsNode();

    // last
    deleteCollectionWithDownNodes();
    if (DEBUG) {
      super.printLayout();
    }
  }
  @Before
  @Override
  public void setUp() throws Exception {
    super.setUp();

    useJettyDataDir = false;

    oldStyleSolrXml = random().nextBoolean();
    if (oldStyleSolrXml) {
      System.err.println("Using old style solr.xml");
    } else {
      System.err.println("Using new style solr.xml");
    }
    if (secondConfigSet) {
      String zkHost = zkServer.getZkHost();
      String zkAddress = zkServer.getZkAddress();
      SolrZkClient zkClient = new SolrZkClient(zkHost, AbstractZkTestCase.TIMEOUT);
      zkClient.makePath("/solr", false, true);
      zkClient.close();

      zkClient = new SolrZkClient(zkAddress, AbstractZkTestCase.TIMEOUT);

      File solrhome = new File(TEST_HOME());

      // for now, always upload the config and schema to the canonical names
      AbstractZkTestCase.putConfig("conf2", zkClient, solrhome, "solrconfig.xml", "solrconfig.xml");
      AbstractZkTestCase.putConfig("conf2", zkClient, solrhome, "schema.xml", "schema.xml");

      AbstractZkTestCase.putConfig(
          "conf2", zkClient, solrhome, "solrconfig.snippet.randomindexconfig.xml");
      AbstractZkTestCase.putConfig("conf2", zkClient, solrhome, "stopwords.txt");
      AbstractZkTestCase.putConfig("conf2", zkClient, solrhome, "protwords.txt");
      AbstractZkTestCase.putConfig("conf2", zkClient, solrhome, "currency.xml");
      AbstractZkTestCase.putConfig("conf2", zkClient, solrhome, "open-exchange-rates.json");
      AbstractZkTestCase.putConfig("conf2", zkClient, solrhome, "mapping-ISOLatin1Accent.txt");
      AbstractZkTestCase.putConfig("conf2", zkClient, solrhome, "old_synonyms.txt");
      AbstractZkTestCase.putConfig("conf2", zkClient, solrhome, "synonyms.txt");
      AbstractZkTestCase.putConfig("conf2", zkClient, solrhome, "elevate.xml");
      zkClient.close();
    }

    System.setProperty("numShards", Integer.toString(sliceCount));
    System.setProperty("solr.xml.persist", "true");
  }
 @After
 public void tearDown() throws Exception {
   super.tearDown();
   client.shutdown();
 }
 @Override
 @After
 public void tearDown() throws Exception {
   super.tearDown();
   resetExceptionIgnores();
 }
 @Before
 @Override
 public void setUp() throws Exception {
   super.setUp();
   System.setProperty("numShards", Integer.toString(sliceCount));
 }