From 01829e8d7cf42b54308046e10a62babe39111ea6 Mon Sep 17 00:00:00 2001 From: Morris Jobke Date: Wed, 29 Jun 2016 15:53:23 +0200 Subject: [PATCH] mysql only works with 3 byte UTF-8 --- .drone.yml | 2 +- tests/lib/Files/Cache/CacheTest.php | 8 ++++++++ 2 files changed, 9 insertions(+), 1 deletion(-) diff --git a/.drone.yml b/.drone.yml index df58c126a0..fc86e72c2b 100644 --- a/.drone.yml +++ b/.drone.yml @@ -20,7 +20,7 @@ build: mysql: image: morrisjobke/nextcloud-ci-php7:1.0.4 commands: - - sleep 10 # gives the database enough time to initialize + - sleep 15 # gives the database enough time to initialize - rm -rf data/* config/config.php # TODO: remove this - temporary fix for CI issues - git submodule update --init - ./autotest.sh mysql diff --git a/tests/lib/Files/Cache/CacheTest.php b/tests/lib/Files/Cache/CacheTest.php index 615bb32f62..bfc3c1be7b 100644 --- a/tests/lib/Files/Cache/CacheTest.php +++ b/tests/lib/Files/Cache/CacheTest.php @@ -9,6 +9,8 @@ namespace Test\Files\Cache; +use Doctrine\DBAL\Platforms\MySqlPlatform; + class LongId extends \OC\Files\Storage\Temporary { public function getId() { return 'long:' . str_repeat('foo', 50) . parent::getId(); @@ -108,6 +110,12 @@ class CacheTest extends \Test\TestCase { * @dataProvider folderDataProvider */ public function testFolder($folder) { + if(strpos($folder, 'F09F9890')) { + // 4 byte UTF doesn't work on mysql + if(\OC::$server->getDatabaseConnection()->getDatabasePlatform() instanceof MySqlPlatform) { + $this->markTestSkipped('MySQL doesn\'t support 4 byte UTF-8'); + } + } $file2 = $folder.'/bar'; $file3 = $folder.'/foo'; $data1 = array('size' => 100, 'mtime' => 50, 'mimetype' => 'httpd/unix-directory');