Closed (fixed)
Project:
Commerce Core
Version:
7.x-1.x-dev
Component:
Tax
Priority:
Normal
Category:
Bug report
Assigned:
Unassigned
Issue tags:
Reporter:
Created:
20 Oct 2011 at 18:53 UTC
Updated:
4 Jan 2014 at 01:11 UTC
Jump to comment: Most recent, Most recent file
Comments
Comment #1
rfayThe only finger I know how to point at this one is the concurrency issue.
I've run this on a testbot using the install that the testbot created (using the web UI). I've run it on a testbot from the command line. The only thing I haven't yet done is running it manually on the command-line with concurrency. I'll try that now.
Comment #2
rfayThe situation here is that only one test is broken, and that test is only broken on the testbot, and then only (AFAICT) when the test is run with high concurrency. (It works fine with manual testing using the command line, drush, or the web UI, and it works fine as such on the testbot)
I've created a clone of commerce in the "Testbot Exercise" project to see what commits might fix this. Test results (with debug) are at http://qa.drupal.org/pifr/test/185179
Essentially, a dummy tax rate is being created in testCommerceTaxUIConfigureTaxRate(), but accessing the rule configuration page seems to be impossible. I appears that the rule didn't get created, or at least the menu entry for it didn't get created.
We could just rewrite this I suppose, but the danger here is that there is in fact a concurrency issue with rules or Commerce. I have added a menu_rebuild() to try to factor that out, but it didn't help.
Looking for suggestions here :-)
The current commit on testbot_exercise is 35604b8, and has this code:
Comment #3
rfayI updated the test to use UI techniques and have the same #fail. The tax rate apparently gets created successfully, but not the rule that goes with it.
Comment #4
rfayTried adding a rules_clear_cache(TRUE) without success:
Comment #5
rfayOpened #1321564: Delay in creating rules component menu links? in the Rules queue.
I'm going to propose that we comment out this test until we have a resolution. We need our tests back.
Here's a patch temporarily removing this test. I recommend that we get this committed.
Comment #6
damien tournoud commentedCould it be just a straight bug?
#1267070: Lazy-rebuilding the defaults for exported entities might not be desirable changed the way entity defaults are rebuilt: they are not rebuilt immediately instead of the next time they are used. As a consequence, we need to clear the tax rate cache before calling entity_defaults_rebuild()...
Comment #7
rfayThis patch brought the number of #fails down to 12.
Reverting #1267070: Lazy-rebuilding the defaults for exported entities might not be desirable resolves this problem.
Comment #8
rfayAttaching my testing routine, with command lines used.
Comment #9
damien tournoud commentedcommerce_tax_ui_tax_type_save() has the same issue.
Comment #10
rfayAnd we bow down:
Tax administration 596 passes, 0 fails, and 0 exceptions
Full verbose output attached, as if it did any good :-)
Comment #11
rszrama commentedGreat, all tests pass locally, too. Thanks for tracking that down, Damien. You da man. : )
This bug was also affecting me in the Shipping 2.x module. Nailed it there, too.
Comment #12
rfaySadly, the tests fail now due to a problem on drupal.org, with project dependency. The dependencies for Commerce are being calculated wrong because an "installation profile" has checked in *all* of commerce, views, etc. as part of the install profile. See #1325658: Please remove all the duplicated modules! You can't just include commerce in your distribution! and #1276914: Contrib module may be considered a dependency instead of core module of the same name and #1325654: Profiles and themes should be excluded
I don't have the privileges to rebuild dependencies unfortunately. But we need a