Skip to main content
aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorAlexander Kurtakov2020-01-16 12:46:23 +0000
committerAlexander Kurtakov2020-01-23 09:21:45 +0000
commit1b53703fa8a7afffc77d5bf226284721b734d649 (patch)
tree2419011f827e532ba86c3b1918577392268085e4 /org.eclipse.ua.tests/help
parent643e7946a1391eb6c5330f588faef7894b11db42 (diff)
downloadeclipse.platform.ua-1b53703fa8a7afffc77d5bf226284721b734d649.tar.gz
eclipse.platform.ua-1b53703fa8a7afffc77d5bf226284721b734d649.tar.xz
eclipse.platform.ua-1b53703fa8a7afffc77d5bf226284721b734d649.zip
Bug 559252 - Update platform.ua to Lucene 8.4.1I20200123-0525I20200123-0430
Adjust code as needed. Drop tests for ancient index versions - if major differs they are treated equally so there is no point in keeping them. Change-Id: I2d4b98ad90505a67c1329fb293da1fbb11a89d55 Signed-off-by: Alexander Kurtakov <akurtako@redhat.com>
Diffstat (limited to 'org.eclipse.ua.tests/help')
-rw-r--r--org.eclipse.ua.tests/help/org/eclipse/ua/tests/help/search/PrebuiltIndexCompatibility.java121
1 files changed, 23 insertions, 98 deletions
diff --git a/org.eclipse.ua.tests/help/org/eclipse/ua/tests/help/search/PrebuiltIndexCompatibility.java b/org.eclipse.ua.tests/help/org/eclipse/ua/tests/help/search/PrebuiltIndexCompatibility.java
index e701dbb17..ba3e20b66 100644
--- a/org.eclipse.ua.tests/help/org/eclipse/ua/tests/help/search/PrebuiltIndexCompatibility.java
+++ b/org.eclipse.ua.tests/help/org/eclipse/ua/tests/help/search/PrebuiltIndexCompatibility.java
@@ -1,5 +1,5 @@
/*******************************************************************************
- * Copyright (c) 2011, 2019 IBM Corporation and others.
+ * Copyright (c) 2011, 2020 IBM Corporation and others.
*
* This program and the accompanying materials
* are made available under the terms of the Eclipse Public License 2.0
@@ -60,38 +60,6 @@ import org.osgi.framework.Bundle;
public class PrebuiltIndexCompatibility {
/**
- * Test index built with Lucene 1.9.1
- */
- @Test(expected = IndexFormatTooOldException.class)
- public void test1_9_1_IndexUnReadable() throws Exception {
- checkReadable("data/help/searchindex/index191");
- }
-
- /**
- * Test index built with Lucene 2.9.1
- */
- @Test(expected = IndexFormatTooOldException.class)
- public void test2_9_1_IndexUnReadable() throws Exception {
- checkReadable("data/help/searchindex/index291");
- }
-
- /**
- * Test index built with Lucene 3.5.0
- */
- @Test(expected = IndexFormatTooOldException.class)
- public void test3_5_0_IndexUnReadable() throws Exception {
- checkReadable("data/help/searchindex/index350");
- }
-
- /**
- * Test index built with Lucene 6.1.0
- */
- @Test(expected = IndexFormatTooOldException.class)
- public void test6_1_0_IndexUnReadable() throws Exception {
- checkReadable("data/help/searchindex/index610");
- }
-
- /**
* Test index built with Lucene 7.0.0
*/
@Test(expected = IndexFormatTooOldException.class)
@@ -100,45 +68,20 @@ public class PrebuiltIndexCompatibility {
}
/**
- * Test index built with Lucene 8.0.0
+ * Test index built with Lucene 8.0.0 IllegalArgumentException with message
+ * proposing to add lucene-backward-codecs
*/
- @Test
- public void test8_0_0_IndexReadable() throws Exception {
+ @Test(expected = IllegalArgumentException.class)
+ public void test8_0_0_IndexUnReadable() throws Exception {
checkReadable("data/help/searchindex/index800");
}
/**
- ** Test compatibility of Lucene 1.9.1 index with current Lucene
- */
- @Test
- public void test1_9_1Compatible()
- {
- checkCompatible("data/help/searchindex/index191", false);
- }
-
- /**
- ** Test compatibility of Lucene 2.9.1 index with current Lucene
+ * Test index built with Lucene 8.4.1
*/
@Test
- public void test2_9_1Compatible()
- {
- checkCompatible("data/help/searchindex/index291", false);
- }
-
- /**
- ** Test compatibility of Lucene 3.5.0 index with current Lucene
- */
- @Test
- public void test3_5_0Compatible() {
- checkCompatible("data/help/searchindex/index350", false);
- }
-
- /**
- ** Test compatibility of Lucene 6.1.0 index with current Lucene
- */
- @Test
- public void test6_1_0Compatible() {
- checkCompatible("data/help/searchindex/index610", false);
+ public void test8_4_1_IndexReadable() throws Exception {
+ checkReadable("data/help/searchindex/index841");
}
/**
@@ -150,31 +93,8 @@ public class PrebuiltIndexCompatibility {
}
@Test
- public void test1_9_1LuceneCompatible()
- {
- checkLuceneCompatible("1.9.1", false);
- }
-
- @Test
- public void test1_4_103NotLuceneCompatible()
- {
- checkLuceneCompatible("1.4.103", false);
- }
-
- @Test
- public void test2_9_1LuceneCompatible()
- {
- checkLuceneCompatible("2.9.1", false);
- }
-
- @Test
- public void test3_5_0LuceneCompatible() {
- checkLuceneCompatible("3.5.0", false);
- }
-
- @Test
- public void test6_1_0LuceneCompatible() {
- checkLuceneCompatible("6.1.0", false);
+ public void test8_0_0Compatible() {
+ checkCompatible("data/help/searchindex/index800", false);
}
@Test
@@ -184,12 +104,17 @@ public class PrebuiltIndexCompatibility {
@Test
public void test8_0_0LuceneCompatible() {
- checkLuceneCompatible("8.0.0", true);
+ checkLuceneCompatible("8.0.0", false);
+ }
+
+ @Test
+ public void test8_4_1LuceneCompatible() {
+ checkLuceneCompatible("8.4.1", true);
}
@Test
public void testPluginIndexEqualToItself() {
- PluginIndex index = createPluginIndex("data/help/searchindex/index610");
+ PluginIndex index = createPluginIndex("data/help/searchindex/index841");
assertTrue(index.equals(index));
}
@@ -198,8 +123,8 @@ public class PrebuiltIndexCompatibility {
*/
@Test
public void testPluginIndexEquality() {
- PluginIndex index1a = createPluginIndex("data/help/searchindex/index610");
- PluginIndex index1b = createPluginIndex("data/help/searchindex/index610");
+ PluginIndex index1a = createPluginIndex("data/help/searchindex/index841");
+ PluginIndex index1b = createPluginIndex("data/help/searchindex/index841");
assertTrue(index1a.equals(index1b));
}
@@ -208,8 +133,8 @@ public class PrebuiltIndexCompatibility {
*/
@Test
public void testPluginIndexHash() {
- PluginIndex index1a = createPluginIndex("data/help/searchindex/index610");
- PluginIndex index1b = createPluginIndex("data/help/searchindex/index610");
+ PluginIndex index1a = createPluginIndex("data/help/searchindex/index841");
+ PluginIndex index1b = createPluginIndex("data/help/searchindex/index841");
assertEquals(index1a.hashCode(), index1b.hashCode());
}
@@ -218,8 +143,8 @@ public class PrebuiltIndexCompatibility {
*/
@Test
public void testPluginIndexInequality() {
- PluginIndex index1 = createPluginIndex("data/help/searchindex/index610");
- PluginIndex index2 = createPluginIndex("data/help/searchindex/index350");
+ PluginIndex index1 = createPluginIndex("data/help/searchindex/index841");
+ PluginIndex index2 = createPluginIndex("data/help/searchindex/index800");
assertFalse(index1.equals(index2));
}

Back to the top