-
-
Notifications
You must be signed in to change notification settings - Fork 825
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Add unit test demonstrating attaching a listener to queries #14716
Conversation
(Standard links)
|
} | ||
catch (PEAR_Exception $e) { | ||
$this->assertEquals( | ||
"SELECT * FROM civicrm_domain [nativecode=1064 ** You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near '/* Forgot trailing comment markerSELECT * FROM civicrm_domain' at line 1]", |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Just wondering if this check could be a bit brittle if the exact text of MySQL's error message changes, or MariaDB diverges from MySQL, or someone runs the test with MySQL in a different locale. Could look for substrings like "nativecode=1064
" and "'/* Forgot trailing comment markerSELECT * FROM civicrm_domain'
" instead?
Jenkins re test this please |
@seamuslee001 this can't pass until the other is merged |
test this please |
Note from the main pr- docs issue outstanding civicrm/civicrm-packages#180 |
Test passes. |
Overview
Unit test for civicrm/civicrm-packages#180
Before
No test
After
Test
Technical Details
Unit test for civicrm/civicrm-packages#180 pretty much stalled on lack of a test for a long time - this is that test. It will fail until that is merged
I think we can also use this method to resolve https://bugs.mysql.com/bug.php?id=68184 which is an issue where for us truncate is very slow & we have had to hack to DELETE FROM instead
Comments
@seamuslee001 @davejenx