You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@geode.apache.org by on...@apache.org on 2020/04/26 03:39:57 UTC
[geode] branch develop updated: GEODE-8025: fix lucene test to not
hang on support branches (#4999)
This is an automated email from the ASF dual-hosted git repository.
onichols pushed a commit to branch develop
in repository https://gitbox.apache.org/repos/asf/geode.git
The following commit(s) were added to refs/heads/develop by this push:
new fad52b8 GEODE-8025: fix lucene test to not hang on support branches (#4999)
fad52b8 is described below
commit fad52b8d8fa449633bc0c87619f6d2f43e0752f7
Author: Owen Nichols <34...@users.noreply.github.com>
AuthorDate: Sat Apr 25 20:39:31 2020 -0700
GEODE-8025: fix lucene test to not hang on support branches (#4999)
---
...ouldBeSuccessfulWhenAllServersRollToCurrentVersion.java | 14 ++++++++++++++
1 file changed, 14 insertions(+)
diff --git a/geode-lucene/src/upgradeTest/java/org/apache/geode/cache/lucene/RollingUpgradeReindexShouldBeSuccessfulWhenAllServersRollToCurrentVersion.java b/geode-lucene/src/upgradeTest/java/org/apache/geode/cache/lucene/RollingUpgradeReindexShouldBeSuccessfulWhenAllServersRollToCurrentVersion.java
index 39ace58..07aed81 100644
--- a/geode-lucene/src/upgradeTest/java/org/apache/geode/cache/lucene/RollingUpgradeReindexShouldBeSuccessfulWhenAllServersRollToCurrentVersion.java
+++ b/geode-lucene/src/upgradeTest/java/org/apache/geode/cache/lucene/RollingUpgradeReindexShouldBeSuccessfulWhenAllServersRollToCurrentVersion.java
@@ -18,11 +18,14 @@ import static org.apache.geode.test.awaitility.GeodeAwaitility.await;
import static org.junit.Assert.assertTrue;
import static org.junit.Assert.fail;
+import org.assertj.core.api.Assertions;
+import org.junit.Assume;
import org.junit.Test;
import org.apache.geode.cache.RegionShortcut;
import org.apache.geode.distributed.internal.InternalLocator;
import org.apache.geode.internal.AvailablePortHelper;
+import org.apache.geode.internal.serialization.Version;
import org.apache.geode.test.dunit.AsyncInvocation;
import org.apache.geode.test.dunit.DistributedTestUtils;
import org.apache.geode.test.dunit.Host;
@@ -34,6 +37,9 @@ public class RollingUpgradeReindexShouldBeSuccessfulWhenAllServersRollToCurrentV
@Test
public void luceneReindexShouldBeSuccessfulWhenAllServersRollToCurrentVersion() throws Exception {
+ Assume.assumeFalse("minor versions should be different",
+ majorMinor(oldVersion).equals(majorMinor(Version.CURRENT.getName())));
+
final Host host = Host.getHost(0);
VM locator1 = host.getVM(oldVersion, 0);
VM server1 = host.getVM(oldVersion, 1);
@@ -109,5 +115,13 @@ public class RollingUpgradeReindexShouldBeSuccessfulWhenAllServersRollToCurrentV
}
}
+ /**
+ * returns the major.minor prefix of a semver
+ */
+ private static String majorMinor(String version) {
+ String[] parts = version.split("\\.");
+ Assertions.assertThat(parts.length).isGreaterThanOrEqualTo(2);
+ return parts[0] + "." + parts[1];
+ }
}