Simpletests are being marked 'postponed' because the 7.x-3.x branch failed testing on 06/08/2015 with uc_cart_links module. See https://qa.drupal.org/pifr/test/132134

I pulled latest code and tested on local server without issue (no fails). Can someone trigger a retest?

CommentFileSizeAuthor
#5 strip-slash.patch959 bytesTR
#4 content.patch530 bytesTR
Support from Acquia helps fund testing for Drupal Acquia logo

Comments

TR’s picture

Category: Bug report » Task

It's a mystery to me why those two tests currently fail on the testbot (they have been failing consistently for about 6 months by the way ... 6/8/15 is simply the most recent date that I triggered a retest...). The tests work for me locally, both in the browser and using run-tests.sh, and were running without a problem for years before they started failing in the testbot. There are no changes in Ubercart that explain the failure - I have run the testbot on older versions of Ubercart and the tests now fail for those older versions whereas they didn't before. Perhaps it's a change to Drupal core (we can't test against older versions of Drupal in the testbot), but since I can't reproduce the failure locally I can't say. I did look through the commit logs for core Drupal but I didn't see anything obvious.

Getting different results locally versus in the testbot has been a persistent and frustrating problem with the testbot since day 1. I'm convinced these cart links fails are not "real" fails in the sense that they represent a problem with the code. Rather, it's almost certainly the test itself that needs to be changed to deal with a testbot environment that was changed at some point. I'll try to spend a couple of more hours on this in the next week.

TR’s picture

Title: 7.x-3.x testing postponed due to uc_cart_links since 06/08/2015 » 7.x-3.x testbot problem
TR’s picture

OK, I commented out the one problematic assert so that now the testbot runs green.

Leaving this issue open so I can debug by submitting patches rather than making a bunch of superfluous commits. I will close the issue when I can restore the assert.

TR’s picture

Status: Active » Needs review
FileSize
530 bytes

Patch which dumps content to see what's going on ...

TR’s picture

FileSize
959 bytes

Seems like the testbot is rewriting all the URLs on every page, so for example something like /user/login gets rewritten as /checkout/?q=user/login

When this is done to cart links, /cart/add/p2_q14_a4o12_a4o11_a4o10_a3o8_a5oqh7oWWkkcsFf gets rewritten as /checkout/?q=cart/add/p2_q14_a4o12_a4o11_a4o10_a3o8_a5oqh7oWWkkcsFf so the test doesn't find the literal cart link string (with leading /) in the page markup, resulting in a test fail. Clicking on the link still works, and the link still functions correctly, it's just the comparison in the test between the expected URL (containing /cart/add) and the found URL (without the / before the cart/add) that is causing the fail.

Let's try a fix of removing the leading slash before the comparison, which should work locally and in the testbot.

TR’s picture

Status: Needs review » Fixed

OK, that should do it. Committed and pushed. Tests should run green now.

  • TR committed 7d001c4 on 7.x-3.x
    Issue [#2505795]: Cart Links test failures in testbot.
    
TR’s picture

Thinking about this some more, I just don't understand why this is a problem for the 7.x-3.x branch, as we have the *exact same* test code in the 6.x-2.x branch and in the 8.x-4.x branch, and they both work correctly. It's only in 7.x-3.x that it failed.

tinker’s picture

@TR, Thanks for the quick fix.

Status: Fixed » Closed (fixed)

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