test: avoid NPE

This commit is contained in:
Martijn van Groningen 2017-07-04 20:33:02 +02:00
parent e7e5216382
commit 141aa226f4
No known key found for this signature in database
GPG Key ID: AB236F4FCF2AF12A
1 changed files with 1 additions and 0 deletions

View File

@ -480,6 +480,7 @@ public class FullClusterRestartIT extends ESRestTestCase {
rsp = toMap(r); rsp = toMap(r);
logger.info("upgrade api response: {}", rsp); logger.info("upgrade api response: {}", rsp);
Map<?, ?> versions = (Map<?, ?>) XContentMapValues.extractValue("upgraded_indices." + index, rsp); Map<?, ?> versions = (Map<?, ?>) XContentMapValues.extractValue("upgraded_indices." + index, rsp);
assertNotNull(versions);
Version upgradeVersion = Version.fromString((String) versions.get("upgrade_version")); Version upgradeVersion = Version.fromString((String) versions.get("upgrade_version"));
assertEquals(Version.CURRENT, upgradeVersion); assertEquals(Version.CURRENT, upgradeVersion);
org.apache.lucene.util.Version luceneVersion = org.apache.lucene.util.Version luceneVersion =