(NFC) Disable tests performing quick search with no orderby as proving to be problema...
authorSeamus Lee <seamuslee001@gmail.com>
Tue, 15 May 2018 08:48:42 +0000 (18:48 +1000)
committerSeamus Lee <seamuslee001@gmail.com>
Tue, 15 May 2018 09:24:11 +0000 (19:24 +1000)
Disable another flacky test

CRM/Utils/SQL.php
tests/phpunit/api/v3/ContactTest.php

index f8bc37a16d9b52472e6cd02fde69de989d949c86..0104fd50c75e23ef461c99c758b86691d0c2ac99 100644 (file)
@@ -121,6 +121,8 @@ class CRM_Utils_SQL {
 
   /**
    * Is the Database set up to handle acceents.
+   * @warning This function was introduced in attempt to determine the reason why the test getInternationalStrings was failing on ubu1604 but passing on ubu1204-5
+   * This function should not be used as the basis of further work as the reasoning is not perfact and is giving false failures.
    * @return bool
    */
   public static function supportStorageOfAccents() {
index d6adee51b3f335afbd543e038f39f2c901207223..e76ee55d9a0d253157db9822cc8506e0ca4423f4 100644 (file)
@@ -2734,12 +2734,13 @@ class api_v3_ContactTest extends CiviUnitTestCase {
         'first_contact' => $firstAlphabeticalContactBySortName,
         'second_contact' => $secondAlphabeticalContactBySortName,
       ),
-      'bob_search_no_orderby' => array(
-        'search_parameters' => array('name' => 'bob'),
-        'settings' => array('includeWildCardInName' => TRUE, 'includeOrderByClause' => FALSE),
-        'first_contact' => $firstContactByID,
-        'second_contact' => $secondContactByID,
-      ),
+      // This test has been disabled as is proving to be problematic to reproduce due to MySQL sorting issues between different versions
+      // 'bob_search_no_orderby' => array(
+      //  'search_parameters' => array('name' => 'bob'),
+      //  'settings' => array('includeWildCardInName' => TRUE, 'includeOrderByClause' => FALSE),
+      //  'first_contact' => $firstContactByID,
+      //  'second_contact' => $secondContactByID,
+      //),
       'bob_search_no_wildcard' => array(
         'search_parameters' => array('name' => 'bob'),
         'settings' => array('includeWildCardInName' => FALSE, 'includeOrderByClause' => TRUE),
@@ -2766,12 +2767,13 @@ class api_v3_ContactTest extends CiviUnitTestCase {
         'first_contact' => $firstAlphabeticalContactFirstNameBob,
         'second_contact' => $secondAlphabeticalContactFirstNameBob,
       ),
-      'first_name_search_no_orderby' => array(
-        'search_parameters' => array('name' => 'bob', 'field_name' => 'first_name'),
-        'settings' => array('includeWildCardInName' => TRUE, 'includeOrderByClause' => FALSE),
-        'first_contact' => $firstByIDContactFirstNameBob,
-        'second_contact' => $secondByIDContactFirstNameBob,
-      ),
+      // This test has been disabled as is proving to be problematic to reproduce due to MySQL sorting issues between different versions
+      //'first_name_search_no_orderby' => array(
+      //  'search_parameters' => array('name' => 'bob', 'field_name' => 'first_name'),
+      //  'settings' => array('includeWildCardInName' => TRUE, 'includeOrderByClause' => FALSE),
+      //  'first_contact' => $firstByIDContactFirstNameBob,
+      //  'second_contact' => $secondByIDContactFirstNameBob,
+      //),
       'email_search_basic' => array(
         'search_parameters' => array('name' => 'bob', 'field_name' => 'email', 'table_name' => 'eml'),
         'settings' => array('includeWildCardInName' => FALSE, 'includeOrderByClause' => TRUE),
@@ -2919,7 +2921,8 @@ class api_v3_ContactTest extends CiviUnitTestCase {
     $this->callAPISuccess('Setting', 'create', array('includeOrderByClause' => FALSE));
     $result = $this->callAPISuccess('contact', 'getquick', array('name' => 'bob'));
     $this->assertEquals('Bob, Bob', $result['values'][0]['sort_name']);
-    $this->assertEquals('E Bobby, Bobby', $result['values'][1]['sort_name']);
+    // This test has been disabled as is proving to be problematic to reproduce due to MySQL sorting issues between different versions
+    //$this->assertEquals('E Bobby, Bobby', $result['values'][1]['sort_name']);
   }
 
   /**