diff --git a/test/data/zt_config.sql b/test/data/zt_config.sql index 0719d3142c..1c994dfebe 100644 --- a/test/data/zt_config.sql +++ b/test/data/zt_config.sql @@ -8,7 +8,7 @@ INSERT INTO `zt_config` (`id`, `vision`, `owner`, `module`, `section`, `key`, `v (6, 'rnd', 'system', 'project', '', 'unitList', 'CNY,USD'), (7, 'rnd', 'system', 'project', '', 'defaultCurrency', 'CNY'), (8, 'rnd', 'system', 'story', '', 'reviewRules', 'allpass'), -(10, 'rnd', 'system', 'common', 'global', 'version', '17.0.beta1'), +(10, '', 'system', 'common', 'global', 'version', '17.4'), (11, 'rnd', 'system', 'common', 'global', 'sn', 'c8aa3269e181f2b9258ce96625de1497'), (12, 'rnd', 'system', 'common', 'global', 'flow', 'full'), (13, 'rnd', 'system', 'common', 'safe', 'mode', '1'), diff --git a/test/lib/db.class.php b/test/lib/db.class.php index 09b502f4eb..c319649560 100644 --- a/test/lib/db.class.php +++ b/test/lib/db.class.php @@ -81,6 +81,8 @@ class db $dbUsed = $this->getUsedDbList(); $lastDB = 0; if(!empty($dbUsed)) $lastDB = max($dbUsed); + + /* If all db is used. */ if($lastDB == $this->config->test->dbNum) { shell_exec("> $this->dbLogFile"); @@ -139,7 +141,7 @@ class db */ function initDB() { - for($i = 1; $i < 11; $i++) + for($i = 1; $i <= $this->config->test->dbNum; $i++) { $this->dao->query('DROP DATABASE ' . $this->config->test->dbPrefix . $i); $this->dao->query('CREATE DATABASE ' . $this->config->test->dbPrefix . $i);