conflict between DrupalTestCase and DrupalWebTestCase

pwolanin - July 26, 2008 - 03:09
Project:SimpleTest
Version:6.x-1.x-dev
Component:Code
Category:bug report
Priority:critical
Assigned:boombatower
Status:closed
Description

In trying to run both contrib and core tests with 6.x I found a very odd and aggravating bug. If you run tests from (for example) CCK or admin_menu that use the 7.x API, followed by the poll module test (possibly others, but this is a clear example), then lots of the poll module tests fail AND at the end of the test Drupal acts as though simpletest and poll modules are disabled! One has to visit the modules page to get them to show up again!

This appears to be due to a stale list of enabled modules. In the poll tests, poll module was already enabled, so the calls to drupalModuleEnable() should have cause a message in the test report that the module was already enabled. This did no happen.

#1

yched - July 26, 2008 - 13:22

could that be related to http://drupal.org/node/275052 ?

#2

pwolanin - July 27, 2008 - 01:06

Maybe related, but the fix that seems to work is to work is to reset the module cache in tearDown() - patch coming...

#3

pwolanin - July 27, 2008 - 14:39
Status:active» patch (code needs review)

I'm having some trouble reproducing this on a more stock install - it's very odd and frustrating. Attached is the patch that fixes this when I see it.

note, this patch could potentially be combined with http://drupal.org/node/274486

AttachmentSize
wacky-router-287398-2.patch681 bytes

#4

boombatower - August 6, 2008 - 02:50

Try new code I have removed support for 7.x style tests in 1.x branch and have created a 2.x branch with complete backport of 7.x module.

#274542: Back-port the batch API patch & related imporvements

#5

pwolanin - August 6, 2008 - 20:25

Does the 2.x branch also support old-style tests? Browsing the files in CVS suggests not.

Also, the drupal_web_test_case.php file is still in the 1.x branch, but your comment above suggests it was removed?

#6

boombatower - August 7, 2008 - 03:07

Was intended to be removed, I'll check it out when I get home.

The 2.x branch does not support the old format.

Rewrote module page and created this documentation explaining it: http://drupal.org/node/291740.

#7

boombatower - August 7, 2008 - 18:19

Removed.

#8

boombatower - August 21, 2008 - 18:38
Status:patch (code needs review)» fixed

Marking as fixed unless found otherwise.

#9

boombatower - August 21, 2008 - 18:39
Assigned to:Anonymous» boombatower

#10

Anonymous (not verified) - September 4, 2008 - 18:42
Status:fixed» closed

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

 
 

Drupal is a registered trademark of Dries Buytaert.