Closed (fixed)
Project:
Drupal core
Version:
7.x-dev
Component:
simpletest.module
Priority:
Critical
Category:
Bug report
Assigned:
Unassigned
Issue tags:
Reporter:
Created:
30 Jun 2009 at 01:05 UTC
Updated:
20 Dec 2011 at 01:26 UTC
Jump to comment: Most recent file
Comments
Comment #1
andypostSuppose testing environment should know db type and use local code
Comment #2
andypostAnother trouble with that issue - this exception handler works inside simpletest's exception handler so sometimes (depends on php version and env config) bring unpredictable results, for example broke batch while returning exception after JSON data
Comment #3
josh waihi commentedThe simple fact that databases will return different error codes means that this is an unreliable way to write code. It is not a condition Drupal can rely on due to its inconsistantcy between databases.
So lets just remove it and not encourage the use of it in code.
Comment #4
andypostSuppose much better to remove this test at all then leave without assert
Comment #5
josh waihi commented@andypost, this test does other assertions that are usefull, its merely the error code assertion that is not of any use.
Comment #6
andypostSo lets commit this, I see no useful info in this assertion
Comment #7
dries commentedCommitted to CVS HEAD. Thanks!
Comment #9
c960657 commentedFWIW, Sqlite also returns 23000.
Comment #10
andypostFollow-up #1376778: Consistent 'duplicate key' detection in core