You are here

function AbstractDrupalSolrOnlineWebTestCase::tearDown in Apache Solr Search 6.3

Same name and namespace in other branches
  1. 8 tests/solr_index_and_search.test \AbstractDrupalSolrOnlineWebTestCase::tearDown()
  2. 7 tests/solr_index_and_search.test \AbstractDrupalSolrOnlineWebTestCase::tearDown()

Delete created files and temporary files directory, delete the tables created by setUp(), and reset the database prefix.

Overrides DrupalWebTestCase::tearDown

File

tests/solr_index_and_search.test, line 162

Class

AbstractDrupalSolrOnlineWebTestCase

Code

function tearDown() {

  // Workaround for drupal.org test bot
  if ($this->solr_available) {

    // Unload the Solr core & delete all files
    $query = array(
      'core' => $this->databasePrefix,
      'deleteIndex' => 'true',
      'deleteDataDir' => 'true',
      'deleteInstanceDir' => 'true',
    );

    // This is currently broken due to
    // https://issues.apache.org/jira/browse/SOLR-3586
    $this
      ->coreAdmin('UNLOAD', $query);
  }
  parent::tearDown();
}