Closed (fixed)
Project:
Drupal core
Version:
7.x-dev
Component:
tests
Priority:
Critical
Category:
Bug report
Assigned:
Unassigned
Reporter:
Created:
28 Jun 2008 at 22:01 UTC
Updated:
19 Aug 2008 at 18:16 UTC
Jump to comment: Most recent file
Comments
Comment #1
catchI can reproduce, failing tests are critical.
Comment #2
catchI did a revert of the patch on http://drupal.org/node/275092 and the tests pass. Marking postponed against that.
Comment #3
cburschkaI disabled theme developer and it passed.
Theme Developer changes the output of theme(), and poll.test compares the local output (where it's enabled) with the CURL response (where it evidently is not).
Comment #4
catchNope, it's broken without theme developer too, and not just the test.
Comment #5
cburschkaWhoops. It must be admitted that the fingerprinting addition DID, indirectly, trigger the bug. Theme developer does not do its stuff before.
I conjecture that the problem is that of calling theme() early in the page load (for the HTTP header) before something else happens - whatever that something else is.
Comment #6
catchI closed the header issue again - running poll test by itself passes both before and after that patch. Whoops from me too.
So the issue seems to be with running all tests. Almost certainly looks like a SimpleTest then (if a sleeper that's been exposed due to core changes).
Theming of the poll bars fails on firefox, works in IE7, that may be a different issue entirely.
Comment #7
catchComment #8
cburschkaThis bug is beginning to look very odd! My own experience so far:
- with Generator patch, with devel_themer: fail
- with Generator patch, without themer: pass
- without patch, with themer: pass
- without either: pass
And in all those cases I was testing only the Poll Creation test case...
Comment #9
boombatower commentedRunning just the Poll test on HEAD without devel I get "Poll create" 67 passes, 7 fails, 0 exceptions
Comment #10
cburschkaFor debugging purposes, I recommend the following which has helped me a lot:
Comment #11
boombatower commentedWith the following you don't need to have the file pointer so you can run this code from any file.
If you omit the FILE_APPEND parameter the first time it is called that would clear the file, creating a log-like affect.
Comment #12
cburschkachx alerted me that without devel, the poll test also fails, and a poll is in fact not themed correctly. I've confirmed both of these, but the latter was a caching problem on my computer. For some reason, poll.css was not being added to the page.
Comment #13
cwgordon7 commentedSolved the issue. Problem was poll module wasn't be loaded even though it was enabled, to confirm this just enable poll module and see that this passes, although no one wants to *actually enable poll module* in real life, so no one knew that. This patch solves the problem by adding a module_load_all() to DrupalWebTestCase::setUp(). Someone needs to run all tests to make sure this didn't break anything, otherwise everything should be fine. Also contains two small coding standard changes in the relevant part of poll.test. Poll tests pass with this patch.
Comment #14
cwgordon7 commentedAs mikey_p pointed out, the above patch did not work. This patch does, problem is mainly that theme() statically caches the hook implementations, with no method of refreshment possible. This removes the assertion altogether, with a TODO note to re-add the assertion once theme() gets around its static caching problem(s).
Comment #15
mikey_p commentedPoll module: 67 passes, 0 fails, 0 exceptions
Comment #16
damien tournoud commentedWell, the test was wrong in comparing the result of theme() to what's shown on the page. This test makes no sense: (1) it is pointless, (2) you should never use internal API in an UI test. So #14 is the way to go, but I would also drop the comment.
Comment #17
catchRe-rolled minus the comment, agree with Damien.
Comment #18
catchHow about a patch?
Comment #19
damien tournoud commentedLooks good to me, but I can't put this in RTBC (that's a patch originating from my own review). catch, do you mind?
Comment #20
catchOK. Tested the re-roll, poll tests pass, logic is improved, back to RTBC then.
Comment #21
dries commentedCommitted to CVS HEAD. Thanks.
Comment #22
Anonymous (not verified) commentedAutomatically closed -- issue fixed for two weeks with no activity.