Skip to content

Commit

Permalink
IGNITE-10184 enable of test after IGNITE-5380 uncomment after fix. - F…
Browse files Browse the repository at this point in the history
…ixes #5390.

Signed-off-by: Dmitriy Pavlov <dpavlov@apache.org>
  • Loading branch information
aliskhakov authored and dspavlov committed Nov 26, 2018
1 parent 7e1d178 commit c870500
Showing 1 changed file with 17 additions and 8 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -20,14 +20,18 @@
import java.util.Collections;
import java.util.Iterator;
import java.util.List;
import java.util.concurrent.Callable;
import java.util.concurrent.atomic.AtomicInteger;
import javax.cache.CacheException;
import org.apache.ignite.IgniteCache;
import org.apache.ignite.cache.QueryEntity;
import org.apache.ignite.cache.query.SqlFieldsQuery;
import org.apache.ignite.cache.query.annotations.QuerySqlField;
import org.apache.ignite.configuration.CacheConfiguration;
import org.apache.ignite.internal.IgniteEx;
import org.apache.ignite.internal.processors.query.schema.SchemaOperationException;
import org.apache.ignite.internal.util.typedef.F;
import org.apache.ignite.internal.util.typedef.X;
import org.apache.ignite.testframework.GridTestUtils;
import org.apache.ignite.testframework.junits.common.GridCommonAbstractTest;

Expand Down Expand Up @@ -292,19 +296,24 @@ private void testQueryEntity(IgniteCache<Long, Person> cache, String tbl) {
*
* @throws Exception If failed.
*/
public void _testTypeConflictInPublicSchema() throws Exception {
// TODO: IGNITE-5380: uncomment work after fix.
fail("Hang for now, need to fix");

public void testTypeConflictInPublicSchema() throws Exception {
node.createCache(new CacheConfiguration<PersonKey, Person>()
.setName(CACHE_PERSON)
.setIndexedTypes(PersonKey.class, Person.class)
.setSqlSchema(QueryUtils.DFLT_SCHEMA));

node.createCache(new CacheConfiguration<PersonKey, Person>()
.setName(CACHE_PERSON_2)
.setIndexedTypes(PersonKey.class, Person.class)
.setSqlSchema(QueryUtils.DFLT_SCHEMA));
Throwable th = GridTestUtils.assertThrows(log, (Callable<Void>) () -> {
node.createCache(new CacheConfiguration<PersonKey, Person>()
.setName(CACHE_PERSON_2)
.setIndexedTypes(PersonKey.class, Person.class)
.setSqlSchema(QueryUtils.DFLT_SCHEMA));

return null;
}, CacheException.class, null);

SchemaOperationException e = X.cause(th, SchemaOperationException.class);

assertEquals(SchemaOperationException.CODE_TABLE_EXISTS, e.code());
}

/**
Expand Down

0 comments on commit c870500

Please sign in to comment.