klcodanr commented on a change in pull request #524:
URL: https://github.com/apache/jackrabbit-oak/pull/524#discussion_r831325838
##########
File path:
oak-search-elastic/src/test/java/org/apache/jackrabbit/oak/plugins/index/elastic/ElasticFunctionIndexCommonTest.java
##########
@@ -16,42 +16,61 @@
*/
package org.apache.jackrabbit.oak.plugins.index.elastic;
+import static
org.apache.jackrabbit.oak.plugins.index.IndexConstants.INDEX_DEFINITIONS_NAME;
+import static
org.apache.jackrabbit.oak.plugins.index.IndexConstants.INDEX_DEFINITIONS_NODE_TYPE;
+import static
org.apache.jackrabbit.oak.plugins.index.IndexConstants.REINDEX_PROPERTY_NAME;
+import static
org.apache.jackrabbit.oak.plugins.index.IndexConstants.TYPE_PROPERTY_NAME;
+
+import java.util.Set;
+import java.util.concurrent.TimeUnit;
+
import org.apache.jackrabbit.JcrConstants;
+import org.apache.jackrabbit.oak.InitialContentHelper;
import org.apache.jackrabbit.oak.api.ContentRepository;
import org.apache.jackrabbit.oak.api.Tree;
import org.apache.jackrabbit.oak.api.Type;
import org.apache.jackrabbit.oak.plugins.index.FunctionIndexCommonTest;
+import
org.apache.jackrabbit.oak.plugins.index.elastic.index.ElasticIndexEditor;
import org.apache.jackrabbit.oak.plugins.index.search.FulltextIndexConstants;
+import org.apache.jackrabbit.oak.plugins.memory.MemoryNodeStore;
import org.apache.jackrabbit.oak.plugins.memory.PropertyStates;
import org.junit.ClassRule;
-import org.junit.Ignore;
-
-import java.util.Set;
-import static
org.apache.jackrabbit.oak.plugins.index.IndexConstants.INDEX_DEFINITIONS_NAME;
-import static
org.apache.jackrabbit.oak.plugins.index.IndexConstants.INDEX_DEFINITIONS_NODE_TYPE;
-import static
org.apache.jackrabbit.oak.plugins.index.IndexConstants.REINDEX_PROPERTY_NAME;
-import static
org.apache.jackrabbit.oak.plugins.index.IndexConstants.TYPE_PROPERTY_NAME;
-
-@Ignore
public class ElasticFunctionIndexCommonTest extends FunctionIndexCommonTest {
@ClassRule
- public static final ElasticConnectionRule elasticRule =
- new
ElasticConnectionRule(ElasticTestUtils.ELASTIC_CONNECTION_STRING);
+ public static final ElasticConnectionRule elasticRule = new
ElasticConnectionRule(
+ ElasticTestUtils.ELASTIC_CONNECTION_STRING);
public ElasticFunctionIndexCommonTest() {
indexOptions = new ElasticIndexOptions();
}
+ @Override
+ protected String getIndexProvider() {
+ return "elasticsearch:";
+ }
+
+ @Override
+ protected void postCommitHook() {
+ try {
+ TimeUnit.SECONDS.sleep(2);
Review comment:
From my investigation while working on this, I didn't see a good way to
either force the index to update or to just perform indexing asynchronously. I
opened another ticket to track improving the performance of this test:
https://issues.apache.org/jira/browse/OAK-9733
--
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]