mkevo commented on a change in pull request #6351:
URL: https://github.com/apache/geode/pull/6351#discussion_r664479525
##########
File path:
geode-lucene/src/upgradeTest/java/org/apache/geode/cache/lucene/LuceneSearchWithRollingUpgradeTestBase.java
##########
@@ -225,12 +224,33 @@ protected static ClientCache createClientCache(Properties
systemProperties,
void putSerializableObjectAndVerifyLuceneQueryResult(VM putter, String
regionName,
+ boolean luceneVersionMismatch,
int expectedRegionSize, int start, int end, VM... vms) throws Exception {
// do puts
putSerializableObject(putter, regionName, start, end);
// verify present in others
- verifyLuceneQueryResultInEachVM(regionName, expectedRegionSize, vms);
+
+ if (!luceneVersionMismatch) {
+ verifyLuceneQueryResultInEachVM(regionName, expectedRegionSize, vms);
+ }
+ }
+
+ public boolean hasLuceneVersionMismatch(Host host) {
+ for (VM vm : host.getAllVMs()) {
+ int currentVersionOrdinal = 0;
+ for (KnownVersion productVersion : KnownVersion.getAllVersions()) {
+ if (vm.getVersion().equals(productVersion.getName())) {
+ currentVersionOrdinal = productVersion.ordinal();
+ } else if (vm.getVersion().equals(VersionManager.CURRENT_VERSION)) {
+ currentVersionOrdinal = KnownVersion.CURRENT_ORDINAL;
+ }
+ }
+ if (currentVersionOrdinal < KnownVersion.GEODE_1_15_0.ordinal()) {
+ return true;
+ }
+ }
+ return false;
Review comment:
The problem with this is on older versions before getDistributionManager
is introduced, and it failed with NoSuchMethodError. For the newer
version(after 1.5.0) it throws NullPointerException in the same place.
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: [email protected]
For queries about this service, please contact Infrastructure at:
[email protected]