Skip to content

Commit

Permalink
HSEARCH-2406 Ignore tests that fail due to bugs for now
Browse files Browse the repository at this point in the history
  • Loading branch information
yrodiere authored and DavideD committed Nov 28, 2016
1 parent 746c974 commit 2c20b7c
Show file tree
Hide file tree
Showing 7 changed files with 35 additions and 2 deletions.
2 changes: 2 additions & 0 deletions elasticsearch/pom.xml
Expand Up @@ -225,6 +225,8 @@
<exclude>**/AnalyzerTest.java</exclude>
<exclude>**/DoubleAnalyzerTest.java</exclude>
<exclude>**/AnalyzerInheritanceTest.java</exclude>
<exclude>**/AnalyzerDefsAnnotationTest.java</exclude>
<exclude>**/AnalyzerDefAnnotationTest.java</exclude>

<!-- HSEARCH-2389 Support indexNullAs for @IndexedEmbedded applied on objects with Elasticsearch -->
<exclude>**/IndexEmbeddedProgrammaticallyMappedTest.java</exclude>
Expand Down
Expand Up @@ -15,10 +15,12 @@
import org.hibernate.search.engine.integration.impl.ExtendedSearchIntegrator;
import org.hibernate.search.query.dsl.QueryBuilder;
import org.hibernate.search.query.engine.spi.EntityInfo;
import org.hibernate.search.testsupport.junit.ElasticsearchSupportInProgress;
import org.hibernate.search.testsupport.junit.SearchFactoryHolder;
import org.hibernate.search.testsupport.setup.TransactionContextForTest;
import org.junit.Rule;
import org.junit.Test;
import org.junit.experimental.categories.Category;

/**
* @author Sanne Grinovero (C) 2013 Red Hat Inc.
Expand All @@ -29,6 +31,7 @@ public class PropertiesExampleBridgeTest {
public SearchFactoryHolder sfHolder = new SearchFactoryHolder( DynamicIndexedValueHolder.class );

@Test
@Category(ElasticsearchSupportInProgress.class) // HSEARCH-2387 Configurable dynamic mapping settings
public void testPropertiesIndexing() {
ExtendedSearchIntegrator searchFactory = sfHolder.getSearchFactory();
Assert.assertNotNull( searchFactory.getIndexManagerHolder().getIndexManager( "all" ) );
Expand Down
Expand Up @@ -31,13 +31,15 @@
import org.hibernate.search.store.DirectoryProvider;
import org.hibernate.search.store.impl.RAMDirectoryProvider;
import org.hibernate.search.testsupport.TestConstants;
import org.hibernate.search.testsupport.junit.ElasticsearchSupportInProgress;
import org.hibernate.search.test.configuration.mutablefactory.generated.Generated;
import org.hibernate.search.testsupport.setup.SearchConfigurationForTest;
import org.hibernate.search.testsupport.setup.TransactionContextForTest;
import org.hibernate.search.query.engine.spi.HSQuery;
import org.hibernate.search.query.engine.spi.EntityInfo;

import org.junit.Test;
import org.junit.experimental.categories.Category;

import static org.junit.Assert.assertEquals;
import static org.junit.Assert.assertFalse;
Expand Down Expand Up @@ -156,6 +158,7 @@ public void testAddingClassSimpleAPI() throws Exception {
}

@Test
@Category(ElasticsearchSupportInProgress.class) // HSEARCH-2421 Support statistics with Elasticsearch
public void testAddingClassSimpleAPIwithJMX() throws Exception {
SearchIntegrator sf = new SearchIntegratorBuilder()
.configuration(
Expand Down Expand Up @@ -230,6 +233,7 @@ private static void doIndexWork(Object entity, Integer id, SearchIntegrator sfi,
}

@Test
@Category(ElasticsearchSupportInProgress.class) // HSEARCH-2480 Adding classes to the SearchIntegrator concurrently fails with Elasticsearch
public void testMultiThreadedAddClasses() throws Exception {
QueryParser parser = new QueryParser( "name", TestConstants.standardAnalyzer );
try ( SearchIntegrator sf = new SearchIntegratorBuilder().configuration( new SearchConfigurationForTest() ).buildSearchIntegrator() ) {
Expand Down Expand Up @@ -318,6 +322,7 @@ public void run() {
i,
extendedIntegrator.getServiceManager()
);
System.err.println( "Creating index #" + i + " for class " + aClass );
extendedIntegrator.addClasses( aClass );
Object entity = aClass.getConstructor( Integer.class, String.class )
.newInstance( i, "Emmanuel" + i );
Expand Down
Expand Up @@ -41,11 +41,13 @@
import org.hibernate.search.query.engine.spi.HSQuery;
import org.hibernate.search.spatial.Coordinates;
import org.hibernate.search.testsupport.TestForIssue;
import org.hibernate.search.testsupport.junit.ElasticsearchSupportInProgress;
import org.hibernate.search.testsupport.junit.SearchFactoryHolder;
import org.hibernate.search.testsupport.setup.TransactionContextForTest;
import org.junit.Before;
import org.junit.Rule;
import org.junit.Test;
import org.junit.experimental.categories.Category;

/**
* @author Emmanuel Bernard
Expand Down Expand Up @@ -108,6 +110,7 @@ private QueryBuilder builder() {
}

@Test
@Category(ElasticsearchSupportInProgress.class) // HSEARCH-2475 Elasticsearch score sorts are reversed
public void score() throws Exception {
Query query = builder().keyword()
.onField( "textField" )
Expand Down Expand Up @@ -173,6 +176,7 @@ public void docID() throws Exception {
}

@Test
@Category(ElasticsearchSupportInProgress.class) // HSEARCH-2474 Elasticsearch sorts ignore the "missing value" property
public void singleField() throws Exception {
Query query = builder().all().createQuery();

Expand Down Expand Up @@ -206,6 +210,7 @@ public void singleField() throws Exception {
}

@Test
@Category(ElasticsearchSupportInProgress.class) // HSEARCH-2474 Elasticsearch sorts ignore the "missing value" property
public void singleField_missingValue_use() throws Exception {
Query query = builder().all().createQuery();

Expand Down Expand Up @@ -240,11 +245,10 @@ public void singleField_missingValue_use() throws Exception {
}

@Test
@Category(ElasticsearchSupportInProgress.class) // HSEARCH-2474 Elasticsearch sorts ignore the "missing value" property
public void singleField_stringFieldBridge() throws Exception {
Query query = builder().all().createQuery();

// Missing value is not provided; the missing values should be considered as 0

Sort sort = builder().sort()
.byField( "fieldBridgedStringField" )
.createSort();
Expand Down Expand Up @@ -281,6 +285,7 @@ public void singleField_stringFieldBridge_missingValue_use() throws Exception {
}

@Test
@Category(ElasticsearchSupportInProgress.class) // HSEARCH-2474 Elasticsearch sorts ignore the "missing value" property
public void singleField_numericFieldBridge() throws Exception {
Query query = builder().all().createQuery();

Expand Down Expand Up @@ -314,6 +319,7 @@ public void singleField_numericFieldBridge() throws Exception {
}

@Test
@Category(ElasticsearchSupportInProgress.class) // HSEARCH-2474 Elasticsearch sorts ignore the "missing value" property
public void singleField_numericFieldBridge_missingValue_use() throws Exception {
Query query = builder().all().createQuery();

Expand Down Expand Up @@ -348,6 +354,7 @@ public void singleField_numericFieldBridge_missingValue_use() throws Exception {
}

@Test(expected = ClassCastException.class)
@Category(ElasticsearchSupportInProgress.class) // HSEARCH-2474 Elasticsearch sorts ignore the "missing value" property
public void singleField_numericFieldBridge_missingValue_use_nonRaw() throws Exception {
Query query = builder().all().createQuery();

Expand All @@ -359,6 +366,7 @@ public void singleField_numericFieldBridge_missingValue_use_nonRaw() throws Exce
}

@Test
@Category(ElasticsearchSupportInProgress.class) // HSEARCH-2474 Elasticsearch sorts ignore the "missing value" property
public void singleField_missingValue_sortFirst() throws Exception {
Query query = builder().all().createQuery();

Expand Down Expand Up @@ -393,6 +401,7 @@ public void singleField_missingValue_sortFirst() throws Exception {
}

@Test
@Category(ElasticsearchSupportInProgress.class) // HSEARCH-2474 Elasticsearch sorts ignore the "missing value" property
public void singleField_missingValue_sortLast() throws Exception {
Query query = builder().all().createQuery();

Expand Down Expand Up @@ -427,6 +436,7 @@ public void singleField_missingValue_sortLast() throws Exception {
}

@Test
@Category(ElasticsearchSupportInProgress.class) // HSEARCH-2474 Elasticsearch sorts ignore the "missing value" property
public void multipleFields() throws Exception {
Query query = builder().all().createQuery();

Expand Down Expand Up @@ -498,6 +508,7 @@ public void distance() throws Exception {
}

@Test
@Category(ElasticsearchSupportInProgress.class) // HSEARCH-2474 Elasticsearch sorts ignore the "missing value" property
public void nativeLucene() throws Exception {
Query query = builder().all().createQuery();

Expand Down Expand Up @@ -529,6 +540,7 @@ public void nativeLucene() throws Exception {
}

@Test
@Category(ElasticsearchSupportInProgress.class) // HSEARCH-2475 Elasticsearch score sorts are reversed
public void fieldThenScore() throws Exception {
Query query = builder().keyword()
.onField( "textField" )
Expand Down Expand Up @@ -566,6 +578,7 @@ public void fieldThenScore() throws Exception {
}

@Test
@Category(ElasticsearchSupportInProgress.class) // HSEARCH-2475 Elasticsearch score sorts are reversed
public void scoreThenField() throws Exception {
Query query = builder().keyword()
.onField( "textField" )
Expand Down
Expand Up @@ -32,12 +32,14 @@
import org.hibernate.search.testsupport.TestForIssue;
import org.hibernate.search.testsupport.concurrency.ConcurrentRunner;
import org.hibernate.search.testsupport.concurrency.ConcurrentRunner.TaskFactory;
import org.hibernate.search.testsupport.junit.ElasticsearchSupportInProgress;
import org.hibernate.search.testsupport.junit.SearchFactoryHolder;
import org.hibernate.search.testsupport.setup.TransactionContextForTest;
import org.junit.Assert;
import org.junit.Before;
import org.junit.Rule;
import org.junit.Test;
import org.junit.experimental.categories.Category;
import org.junit.rules.ExpectedException;

/**
Expand Down Expand Up @@ -117,6 +119,7 @@ public void projectingUnknownField() {
}

@Test
@Category(ElasticsearchSupportInProgress.class) // HSEARCH-2423 Projecting an unstored field should raise an exception
public void projectingUnstoredField() {
thrown.expect( SearchException.class );
thrown.expectMessage( "HSEARCH000323" );
Expand Down Expand Up @@ -181,6 +184,7 @@ public void projectingOnConflictingMappedIdField() {
}

@Test
@Category(ElasticsearchSupportInProgress.class) // HSEARCH-2484 Concurrent projections fails randomly with Elasticsearch due to service access issues
public void concurrentMixedProjections() throws Exception {
//The point of this test is to "simultaneously" project multiple different types
new ConcurrentRunner( 1000, 20,
Expand Down
Expand Up @@ -19,12 +19,14 @@
import org.hibernate.search.query.dsl.QueryBuilder;
import org.hibernate.search.query.engine.spi.EntityInfo;
import org.hibernate.search.query.engine.spi.HSQuery;
import org.hibernate.search.testsupport.junit.ElasticsearchSupportInProgress;
import org.hibernate.search.testsupport.junit.SearchFactoryHolder;
import org.hibernate.search.testsupport.serialization.SerializationTestHelper;
import org.hibernate.search.testsupport.setup.TransactionContextForTest;
import org.junit.Assert;
import org.junit.Rule;
import org.junit.Test;
import org.junit.experimental.categories.Category;


/**
Expand All @@ -33,6 +35,7 @@
*
* @author Sanne Grinovero
*/
@Category(ElasticsearchSupportInProgress.class) // HSEARCH-2478 ElasticsearchHSQueryImpl is not serializable
public class QuerySerializationTest {

@Rule
Expand Down
Expand Up @@ -32,10 +32,12 @@
import org.hibernate.search.spi.BuildContext;
import org.hibernate.search.store.ShardIdentifierProvider;
import org.hibernate.search.testsupport.setup.TransactionContextForTest;
import org.hibernate.search.testsupport.junit.ElasticsearchSupportInProgress;
import org.hibernate.search.testsupport.junit.SearchFactoryHolder;
import org.hibernate.search.testsupport.TestForIssue;
import org.junit.Rule;
import org.junit.Test;
import org.junit.experimental.categories.Category;

/**
* The example scenario: a system which indexes log messages of some periodic event
Expand Down Expand Up @@ -70,6 +72,7 @@ public class LogRotationExampleTest {
.withProperty( "hibernate.search.logs.sharding_strategy", LogMessageShardingStrategy.class.getName() );

@Test
@Category(ElasticsearchSupportInProgress.class) // HSEARCH-2477 Shard filtering doesn't work with Elasticsearch queries
public void filtersTest() {
ExtendedSearchIntegrator searchFactory = sfHolder.getSearchFactory();
Assert.assertNotNull( searchFactory.getIndexManagerHolder() );
Expand Down

0 comments on commit 2c20b7c

Please sign in to comment.