fixed upgrade unittest

This commit is contained in:
anthony 2011-03-08 18:24:11 -08:00
parent 9e9ec24c70
commit 5781aafdcb
3 changed files with 3 additions and 3 deletions

View File

@ -152,7 +152,7 @@ public class VersionDaoImpl extends GenericDaoBase<VersionVO, Long> implements V
throw new ConfigurationException("There is no upgrade path from " + dbVersion + " to " + currentVersion);
}
if (Version.compare(currentVersion, upgrades[upgrades.length - 1].getUpgradedVersion()) == 0) {
if (Version.compare(currentVersion, upgrades[upgrades.length - 1].getUpgradedVersion()) != 0) {
throw new ConfigurationException("The end upgrade version is actually at " + upgrades[upgrades.length - 1].getUpgradedVersion() + " but our management server code version is at " + currentVersion);
}

View File

@ -79,7 +79,7 @@ public class AdvanceZone217To221UpgradeTest extends TestCase {
assert version.equals("2.1.7") : "Version returned is not 2.1.7 but " + version;
try {
dao.upgrade("2.1.7", "2.2.1");
dao.upgrade("2.1.7", "2.2.3");
} catch (ConfigurationException e) {
s_logger.warn("Exception: ", e);
assert false : "The test failed. Check logs";

View File

@ -71,7 +71,7 @@ public class BasicZone217To221UpgradeTest extends TestCase {
}
try {
dao.upgrade("2.1.7", "2.2.1");
dao.upgrade("2.1.7", "2.2.3");
} catch (ConfigurationException e) {
s_logger.warn("Exception: ", e);
assert false : "The test failed. Check logs";