Download & Extend

Module implementation cache not flushed properly by Simpletest

Project:Drupal core
Version:7.x-dev
Component:base system
Category:bug report
Priority:critical
Assigned:Unassigned
Status:closed (fixed)

Issue Summary

Steps to reproduce:
- Run any one of the database tests
- On the results page, reload (admin/build/testing)

Error:
warning: call_user_func_array() [function.call-user-func-array]: First argument is expected to be a valid callback, 'database_test_query_alter' was given in /home/davereid/Projects/drupal-head/includes/common.inc on line 2750.

My guess would be that the database tests are not properly unloading the database_test.module somehow and trying to use the _query_alter on a non-test database query.

Comments

#1

Title:warning: call_user_func_array(): First argument is expected to be a valid callback, 'database_test_alter_query'» Warning after running database tests - call_user_func_array() with 'database_test_alter_query'

Little better title.

#2

Title:Warning after running database tests - call_user_func_array() with 'database_test_alter_query'» Module implementation cache not flushed properly by Simpletest
Component:database system» base system
Priority:minor» critical

This is the combination of two issues:

1. DWTC->tearDown() don't flush the module_implements() static cache (this is bad)
2. there is no way to flush registry_cache_hook_implementations() static cache, so implementations of all modules loaded across a page request will get saved to the registry cache at the end of the request (when drupal_footer is called), even if the module_implements() static cache is properly flushed ===> the rogue implementations will be reloaded at the next request! (this is even worse)

(1) could be solved by a patch to DWTC... (2) is already solved by #298600: DBTNG: make module_implements work regardless of bootstrap phase.

Bumping to critical, since that could have other side-effects.

#3

Now that #298600: DBTNG: make module_implements work regardless of bootstrap phase when in, this is now worse: the implementation is permanently staying...

#4

Status:active» needs review

Easy fix.

AttachmentSizeStatusTest resultOperations
321161-simpletest-flush-module-implement.patch916 bytesIgnored: Check issue status.NoneNone

#5

Status:needs review» reviewed & tested by the community

Thanks for the fix.

#6

Status:reviewed & tested by the community» fixed

Committed to CVS HEAD. Thanks.

--project followup subject--

Automatically closed -- issue fixed for two weeks with no activity.

#7

Status:fixed» closed (fixed)

Automatically closed -- issue fixed for two weeks with no activity.

nobody click here