Skip to main content
aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorChris Goldthorpe2010-07-07 19:07:37 -0400
committerChris Goldthorpe2010-07-07 19:07:37 -0400
commite26a02a73ec8635a60120b3a8ca5b9f39a4e5d9a (patch)
tree91e24104a8164eb039f27532a8c3e15c9fb602cb
parenta7a5c4925264cb74867d233b374621fafbb1c939 (diff)
downloadeclipse.platform.ua-e26a02a73ec8635a60120b3a8ca5b9f39a4e5d9a.tar.gz
eclipse.platform.ua-e26a02a73ec8635a60120b3a8ca5b9f39a4e5d9a.tar.xz
eclipse.platform.ua-e26a02a73ec8635a60120b3a8ca5b9f39a4e5d9a.zip
Test was not finalizing the index which could cause random failures.
-rw-r--r--org.eclipse.ua.tests/help/org/eclipse/ua/tests/help/remote/SearchIndexCreation.java15
1 files changed, 15 insertions, 0 deletions
diff --git a/org.eclipse.ua.tests/help/org/eclipse/ua/tests/help/remote/SearchIndexCreation.java b/org.eclipse.ua.tests/help/org/eclipse/ua/tests/help/remote/SearchIndexCreation.java
index 977805d1d..e9f9c3fde 100644
--- a/org.eclipse.ua.tests/help/org/eclipse/ua/tests/help/remote/SearchIndexCreation.java
+++ b/org.eclipse.ua.tests/help/org/eclipse/ua/tests/help/remote/SearchIndexCreation.java
@@ -51,6 +51,20 @@ public class SearchIndexCreation extends TestCase {
addHrefToIndex(index, "/org.eclipse.ua.tests/data/help/search/test7.html", true);
addHrefToIndex(index, "/org.eclipse.ua.tests/data/help/search/test8.htm", true);
addHrefToIndex(index, "/org.eclipse.ua.tests/data/help/search/test77.htm", false); // Does not exist
+ index.endAddBatch(false, true);
+ int finalCallCount = MockContentServlet.getCallcount();
+ assertEquals("Remote server called", 0, finalCallCount - initialCallCount);
+ }
+
+ public void testSearchIndexMakesNoRemoteCalls2() throws Throwable {
+ int initialCallCount = MockContentServlet.getCallcount();
+ SearchIndexWithIndexingProgress index = new SearchIndexWithIndexingProgress("en-us", analyzerDesc, HelpPlugin
+ .getTocManager());
+ index.beginAddBatch(true);
+ addHrefToIndex(index, "/org.eclipse.ua.tests/data/help/search/test7.html", true);
+ addHrefToIndex(index, "/org.eclipse.ua.tests/data/help/search/test8.htm", true);
+ addHrefToIndex(index, "/org.eclipse.ua.tests/data/help/search/test77.htm", false); // Does not exist
+ index.endAddBatch(false, true);
int finalCallCount = MockContentServlet.getCallcount();
assertEquals("Remote server called", 0, finalCallCount - initialCallCount);
}
@@ -64,6 +78,7 @@ public class SearchIndexCreation extends TestCase {
addHrefToIndex(index, "/org.eclipse.ua.tests/data/help/search/test7.html", true);
addHrefToIndex(index, "/org.eclipse.ua.tests/data/help/search/test8.htm", true);
addHrefToIndex(index, "/org.eclipse.ua.tests/data/help/search/test77.htm", false); // Does not exist
+ index.endAddBatch(false, true);
int finalCallCount = MockContentServlet.getCallcount();
assertEquals("Remote server called", 0, finalCallCount - initialCallCount);
}

Back to the top