From cd230b31b6b4026929feb71e0e4f131331c49ff6 Mon Sep 17 00:00:00 2001 From: Eric Merrill Date: Tue, 1 Jul 2014 10:25:10 -0400 Subject: [PATCH] MDL-42071 caching Skip memcache(d) tests if no servers defined --- cache/stores/memcache/tests/memcache_test.php | 4 ++++ cache/stores/memcached/tests/memcached_test.php | 4 ++++ 2 files changed, 8 insertions(+) diff --git a/cache/stores/memcache/tests/memcache_test.php b/cache/stores/memcache/tests/memcache_test.php index bf9dad3aa2005..63d366c6468d0 100644 --- a/cache/stores/memcache/tests/memcache_test.php +++ b/cache/stores/memcache/tests/memcache_test.php @@ -141,6 +141,10 @@ public function test_valid_keys() { public function test_clustered() { $this->resetAfterTest(true); + if (!defined('TEST_CACHESTORE_MEMCACHE_TESTSERVERS')) { + $this->markTestSkipped(); + } + $testservers = explode("\n", trim(TEST_CACHESTORE_MEMCACHE_TESTSERVERS)); if (count($testservers) < 2) { diff --git a/cache/stores/memcached/tests/memcached_test.php b/cache/stores/memcached/tests/memcached_test.php index 756744aa29da0..506e583c01c15 100644 --- a/cache/stores/memcached/tests/memcached_test.php +++ b/cache/stores/memcached/tests/memcached_test.php @@ -141,6 +141,10 @@ public function test_valid_keys() { public function test_clustered() { $this->resetAfterTest(true); + if (!defined('TEST_CACHESTORE_MEMCACHED_TESTSERVERS')) { + $this->markTestSkipped(); + } + $testservers = explode("\n", trim(TEST_CACHESTORE_MEMCACHED_TESTSERVERS)); if (count($testservers) < 2) {