You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@ignite.apache.org by ag...@apache.org on 2018/11/28 11:52:52 UTC
[21/50] [abbrv] ignite git commit: IGNITE-10184 enable of test after
IGNITE-5380 uncomment after fix. - Fixes #5390.
IGNITE-10184 enable of test after IGNITE-5380 uncomment after fix. - Fixes #5390.
Signed-off-by: Dmitriy Pavlov <dp...@apache.org>
Project: http://git-wip-us.apache.org/repos/asf/ignite/repo
Commit: http://git-wip-us.apache.org/repos/asf/ignite/commit/c870500a
Tree: http://git-wip-us.apache.org/repos/asf/ignite/tree/c870500a
Diff: http://git-wip-us.apache.org/repos/asf/ignite/diff/c870500a
Branch: refs/heads/ignite-9720
Commit: c870500a4144168e31a75046f848cba741dba96d
Parents: 7e1d178
Author: Albert Iskhakov <al...@gmail.com>
Authored: Mon Nov 26 17:28:38 2018 +0300
Committer: Dmitriy Pavlov <dp...@apache.org>
Committed: Mon Nov 26 17:28:38 2018 +0300
----------------------------------------------------------------------
.../processors/query/SqlSchemaSelfTest.java | 25 +++++++++++++-------
1 file changed, 17 insertions(+), 8 deletions(-)
----------------------------------------------------------------------
http://git-wip-us.apache.org/repos/asf/ignite/blob/c870500a/modules/indexing/src/test/java/org/apache/ignite/internal/processors/query/SqlSchemaSelfTest.java
----------------------------------------------------------------------
diff --git a/modules/indexing/src/test/java/org/apache/ignite/internal/processors/query/SqlSchemaSelfTest.java b/modules/indexing/src/test/java/org/apache/ignite/internal/processors/query/SqlSchemaSelfTest.java
index b271d80..dcfffd8 100644
--- a/modules/indexing/src/test/java/org/apache/ignite/internal/processors/query/SqlSchemaSelfTest.java
+++ b/modules/indexing/src/test/java/org/apache/ignite/internal/processors/query/SqlSchemaSelfTest.java
@@ -20,14 +20,18 @@ package org.apache.ignite.internal.processors.query;
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;
@@ -292,19 +296,24 @@ public class SqlSchemaSelfTest extends GridCommonAbstractTest {
*
* @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());
}
/**