MDL-37935 cache: improved ready testing of stores on admin screen and testing script

This commit is contained in:
Sam Hemelryk
2013-03-01 10:09:20 +13:00
parent 19075a2120
commit 704d82627c
4 changed files with 22 additions and 1 deletions
+7
View File
@@ -55,6 +55,7 @@ $strinvalidplugin = new lang_string('invalidplugin', 'cache');
$strunsupportedmode = new lang_string('unsupportedmode', 'cache');
$struntestable = new lang_string('untestable', 'cache');
$strtested = new lang_string('tested', 'cache');
$strnotready = new lang_string('storenotready', 'cache');
foreach (get_plugin_list_with_file('cachestore', 'lib.php', true) as $plugin => $path) {
@@ -74,6 +75,8 @@ foreach (get_plugin_list_with_file('cachestore', 'lib.php', true) as $plugin =>
$store = $class::initialise_test_instance($application);
if ($store === false) {
$applicationtable->data[] = array($plugin, $struntestable, '-', '-', '-', '-');
} else if (!$store->is_ready()) {
$applicationtable->data[] = array($plugin, $strnotready, '-', '-', '-', '-');
} else {
$result = array($plugin, $strtested, 0, 0, 0);
$start = microtime(true);
@@ -110,6 +113,8 @@ foreach (get_plugin_list_with_file('cachestore', 'lib.php', true) as $plugin =>
$store = $class::initialise_test_instance($session);
if ($store === false) {
$sessiontable->data[] = array($plugin, $struntestable, '-', '-', '-', '-');
} else if (!$store->is_ready()) {
$sessiontable->data[] = array($plugin, $strnotready, '-', '-', '-', '-');
} else {
$result = array($plugin, $strtested, 0, 0, 0);
$start = microtime(true);
@@ -146,6 +151,8 @@ foreach (get_plugin_list_with_file('cachestore', 'lib.php', true) as $plugin =>
$store = $class::initialise_test_instance($request);
if ($store === false) {
$requesttable->data[] = array($plugin, $struntestable, '-', '-', '-', '-');
} else if (!$store->is_ready()) {
$requesttable->data[] = array($plugin, $strnotready, '-', '-', '-', '-');
} else {
$result = array($plugin, $strtested, 0, 0, 0);
$start = microtime(true);