Closed (fixed)
Project:
Ubercart
Version:
7.x-3.x-dev
Component:
Code
Priority:
Normal
Category:
Task
Assigned:
Unassigned
Reporter:
Created:
14 Jun 2015 at 06:15 UTC
Updated:
29 Jun 2015 at 19:44 UTC
Jump to comment: Most recent, Most recent file
Comments
Comment #1
tr commentedIt'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.
Comment #2
tr commentedComment #3
tr commentedOK, 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.
Comment #4
tr commentedPatch which dumps content to see what's going on ...
Comment #5
tr commentedSeems 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.
Comment #6
tr commentedOK, that should do it. Committed and pushed. Tests should run green now.
Comment #8
tr commentedThinking 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.
Comment #9
tinker commented@TR, Thanks for the quick fix.