Tests under the newest release of MAMP (1.7.2) fail absolutely spectacularly.

For example, the Aggregator group of tests ends up with 132 passes, 131 fails, 36 exceptions.

In contrast, others in #drupal with cURL 7.16.xx had 0 failures.

I traced this with some tedious error_log()ing to the curlExec() function in drupal_web_test_case.php, which doesn't appear to be able to POST values at all. Dumping $this->_content directly after $this->drupalSetContent(curl_exec($this->ch), curl_getinfo($this->ch, CURLINFO_EFFECTIVE_URL)); merely spits back the same form, rather than the page one would expect once the form values were submitted.

Um. Help? Not being able to run tests kind of puts a damper on the whole committing patches thing. ;P

Support from Acquia helps fund testing for Drupal Acquia logo

Comments

lyricnz’s picture

I can confirm this behaviour (MAMP 1.7.2). It looks like it's literally doing GET requests, rather than POST requests. Here's the Apache access_log for aggregator.test:

::1 - - [14/Sep/2008:14:25:57 +1000] "POST /drupal/admin/build/testing HTTP/1.1" 302 -
::1 - - [14/Sep/2008:14:25:57 +1000] "GET /drupal/batch?op=start&id=5 HTTP/1.1" 200 3597
::1 - - [14/Sep/2008:14:25:58 +1000] "GET /drupal/misc/progress.js?1221366357 HTTP/1.1" 200 3042
::1 - - [14/Sep/2008:14:25:58 +1000] "GET /drupal/misc/batch.js?1221366357 HTTP/1.1" 200 1215
::1 - - [14/Sep/2008:14:26:01 +1000] "GET /drupal HTTP/1.1" 301 328
::1 - - [14/Sep/2008:14:26:01 +1000] "GET /drupal/ HTTP/1.1" 200 5791
::1 - - [14/Sep/2008:14:26:01 +1000] "GET /drupal/user HTTP/1.1" 200 4262
::1 - - [14/Sep/2008:14:26:02 +1000] "GET /drupal/user HTTP/1.1" 200 4262
::1 - - [14/Sep/2008:14:26:02 +1000] "GET /drupal/admin/content/aggregator/add/feed HTTP/1.1" 403 4460
::1 - - [14/Sep/2008:14:26:02 +1000] "GET /drupal/aggregator/sources/ HTTP/1.1" 403 4333
::1 - - [14/Sep/2008:14:26:02 +1000] "GET /drupal/admin/content/aggregator/edit/feed/ HTTP/1.1" 403 4462
::1 - - [14/Sep/2008:14:25:58 +1000] "POST /drupal/batch?id=5&op=do HTTP/1.1" 200 360
::1 - - [14/Sep/2008:14:26:06 +1000] "GET /drupal HTTP/1.1" 301 328
::1 - - [14/Sep/2008:14:26:06 +1000] "GET /drupal/ HTTP/1.1" 200 5791
::1 - - [14/Sep/2008:14:26:06 +1000] "GET /drupal/user HTTP/1.1" 200 4262
::1 - - [14/Sep/2008:14:26:06 +1000] "GET /drupal/user HTTP/1.1" 200 4262
::1 - - [14/Sep/2008:14:26:06 +1000] "GET /drupal/admin/content/aggregator/add/feed HTTP/1.1" 403 4460
::1 - - [14/Sep/2008:14:26:06 +1000] "GET /drupal/admin/content/aggregator/edit/feed/ HTTP/1.1" 403 4462
::1 - - [14/Sep/2008:14:26:07 +1000] "GET /drupal/aggregator/sources/ HTTP/1.1" 403 4333
::1 - - [14/Sep/2008:14:26:07 +1000] "GET /drupal/admin/content/aggregator/edit/feed/ HTTP/1.1" 403 4462
::1 - - [14/Sep/2008:14:26:02 +1000] "POST /drupal/batch?id=5&op=do HTTP/1.1" 200 507

Whereas it used to look more like this:

::1 - - [14/Sep/2008:13:19:46 +1000] "POST /drupal/admin/build/testing HTTP/1.1" 302 -
::1 - - [14/Sep/2008:13:19:47 +1000] "GET /drupal/batch?op=start&id=5 HTTP/1.1" 200 3597
::1 - - [14/Sep/2008:13:19:47 +1000] "GET /drupal/misc/progress.js?1221362387 HTTP/1.1" 200 3042
::1 - - [14/Sep/2008:13:19:47 +1000] "GET /drupal/misc/batch.js?1221362387 HTTP/1.1" 200 1215
::1 - - [14/Sep/2008:13:19:47 +1000] "GET /drupal/misc/progress.gif HTTP/1.1" 200 790
::1 - - [14/Sep/2008:13:19:52 +1000] "GET /drupal HTTP/1.1" 301 321
::1 - - [14/Sep/2008:13:19:52 +1000] "GET /drupal/ HTTP/1.1" 200 5686
::1 - - [14/Sep/2008:13:19:53 +1000] "GET /drupal/user HTTP/1.1" 200 4157
::1 - - [14/Sep/2008:13:19:53 +1000] "POST /drupal/user HTTP/1.1" 302 -
::1 - - [14/Sep/2008:13:19:53 +1000] "GET /drupal/user/4 HTTP/1.1" 200 3550
::1 - - [14/Sep/2008:13:19:54 +1000] "GET /drupal/logout HTTP/1.1" 302 -
::1 - - [14/Sep/2008:13:19:54 +1000] "GET /drupal/ HTTP/1.1" 200 4781
::1 - - [14/Sep/2008:13:19:54 +1000] "GET /drupal/user HTTP/1.1" 200 4157
::1 - - [14/Sep/2008:13:19:54 +1000] "GET /drupal/user HTTP/1.1" 200 4157
::1 - - [14/Sep/2008:13:19:55 +1000] "POST /drupal/user HTTP/1.1" 302 -
::1 - - [14/Sep/2008:13:19:55 +1000] "GET /drupal/user/3 HTTP/1.1" 200 3477
::1 - - [14/Sep/2008:13:19:55 +1000] "GET /drupal/logout HTTP/1.1" 302 -
::1 - - [14/Sep/2008:13:19:55 +1000] "GET /drupal/ HTTP/1.1" 200 4781
::1 - - [14/Sep/2008:13:19:55 +1000] "GET /drupal/user HTTP/1.1" 200 4157
::1 - - [14/Sep/2008:13:19:56 +1000] "GET /drupal/user HTTP/1.1" 200 4157
webchick’s picture

Status: Active » Needs review
FileSize
1.16 KB

After several minutes of troubleshooting, chx suggested removing this bit, and suddenly everything works.

Needs to be tested by someone NOT on this screwy version of MAMP. ;)

chx’s picture

FileSize
825 bytes

tested, works. I can not understand what happens really here but works for now.

webchick’s picture

To clarify, chx's patch reverts this line back to the way it was before #231190: Page Cache doesn't work with HEAD requests landed.

lyricnz’s picture

Status: Needs review » Reviewed & tested by the community

I've tried this a couple of times to be sure, and the patch in #2 works for me, while the patch in #3 produces the same errors as the unpatched head. Given that, I'll RTBC the patch in comment #2 (webchick)

lyricnz’s picture

Patch also works on older version of MAMP (1.7.1)

webchick’s picture

Status: Reviewed & tested by the community » Fixed

Committed. Thanks for awesome debug session, folks! :D

c960657’s picture

After revision 1.39 of modules/simpletest/drupal_web_test_case.php was checked in, I get 1 failed test in the Tracker module:

Message:    New comments are counted on the tracker listing pages. 
Group:      Other
Filename:   tracker.test
Line:       140
Function:   TrackerTest->testTrackerNewComments()
c960657’s picture

Hmm, it looks as if the test just sometimes fails, i.e. it is probably not related to this issue. Please ignore comment #8.

webchick’s picture

Hey, c960657, could you hop into #drupal IRC sometime? The entire test suite is passing okay here, and it's easier for us to debug test failures in real time than over the issue queue.

c960657’s picture

I think I found the reason for the failing test: #309951: Tracker test sometimes fails. It is completely unrelated to this issue.

I'll drop by #drupal the next time I experience failing tests :-)

Anonymous’s picture

Status: Fixed » Closed (fixed)

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

lyricnz’s picture