Skip to main content
aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-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