The following error occurred when run test for Apache SOLR (1.2 & 1.x):

CommentFileSizeAuthor
#6 1101406-6.patch2.74 KBpwolanin
#4 apachesolr.test-989398.patch2.41 KBkenorb
Support from Acquia helps fund testing for Drupal Acquia logo

Comments

kenorb’s picture

( ! ) Fatal error: Call to a member function remove_filter() on a non-object in sites/all/modules/apachesolr/tests/solr_base_query.test on line 45
Call Stack
# Time Memory Function Location
1 0.0003 61244 {main}( ) ../index.php:0
2 0.5474 33409248 menu_execute_active_handler( $path = ??? ) ../index.php:18
3 0.5544 34072740 call_user_func_array ( 'system_batch_page', array () ) ../menu.inc:348
4 0.5544 34072976 system_batch_page( ) ../menu.inc:0
5 0.5553 34158180 _batch_page( ) ../system.admin.inc:1841
6 0.5558 34166668 _batch_progress_page_nojs( ) ../batch.inc:39
7 1.8671 50184560 _batch_process( array ('sets' => array (0 => array (...)), 'current_set' => 0, 'progressive' => TRUE, 'url' => 'batch', 'source_page' => 'admin/build/testing', 'redirect' => 'admin/build/testing/results/8', 'id' => '27', 'error_message' => 'Please continue to <a href="/batch?id=27&amp;op=finished">the error page</a>', 'running' => TRUE) ) ../batch.inc:147
8 1.8672 50189320 call_user_func_array ( '_simpletest_batch_operation', array (0 => array (0 => 'DrupalApacheSolrNodeAccess', 1 => 'DrupalSolrMatchTestCase', 2 => 'DrupalSolrQueryTests', 3 => 'DrupalSolrSubQueryTests'), 1 => '8', 2 => array ('sandbox' => array (...), 'results' => array (...), 'finished' => 1, 'message' => '')) ) ../batch.inc:190
9 1.8672 50189464 _simpletest_batch_operation( $test_list_init = array (0 => 'DrupalApacheSolrNodeAccess', 1 => 'DrupalSolrMatchTestCase', 2 => 'DrupalSolrQueryTests', 3 => 'DrupalSolrSubQueryTests'), $test_id = '8', $context = array ('sandbox' => array ('max' => 4, 'tests' => array (...), 'test_results' => array (...)), 'results' => array ('test_id' => '8'), 'finished' => 1, 'message' => '') ) ../batch.inc:0
10 3.2815 63631696 DrupalTestCase->run( ) ../simpletest.module:214
11 15.0312 65087420 DrupalSolrQueryTests->testParseSimple( ) ../drupal_web_test_case.php:429
Variables in local scope (#11)
$query =
null
$string =
string 'foo' (length=3)

 

      $query = apachesolr_drupal_query($string);
      // force the query to be rebuilt without removing any fields.
      $query->remove_filter('fake-field-name');
jpmckinney’s picture

Status: Active » Closed (duplicate)

Tests are quite broken. Marking duplicate of #989398: Apache Solr: Get some tests working.

kenorb’s picture

Status: Closed (duplicate) » Active

Duplicated issue #989398: Apache Solr: Get some tests working
didn't solve the problems on 6.x

kenorb’s picture

Priority: Normal » Critical
Status: Active » Needs review
FileSize
2.41 KB

Without this patch the whole Simpletest environment is broken (can't run all tests, it stops).
Basically I've commented out the whole functionality of two files, because it's useless with fatal error.
Maybe faster will be to remove these file completely from the 6.x repository (tests/solr_base_subquery.test and tests/solr_base_query.test).

pwolanin’s picture

The tests need to be updated for changes to simpltest - we shoudl probably backport some of the changes in 6.x-3.x

pwolanin’s picture

Title: Test: Call to a member function remove_filter() on a non-object in tests/solr_base_query.test on line 45 » Fix simpletests in 6.x-1.1x
Status: Needs review » Active
FileSize
2.74 KB

Ok, committing this as a basis for moving forward.

kenorb’s picture

Priority: Critical » Minor
Issue summary: View changes