IGNITE-9639: Fixed flaky failures in SqlSystemViewsSelfTest. This closes #4787.
Project: http://git-wip-us.apache.org/repos/asf/ignite/repo Commit: http://git-wip-us.apache.org/repos/asf/ignite/commit/8ad6805f Tree: http://git-wip-us.apache.org/repos/asf/ignite/tree/8ad6805f Diff: http://git-wip-us.apache.org/repos/asf/ignite/diff/8ad6805f Branch: refs/heads/ignite-gg-14206 Commit: 8ad6805f08386f621fe9860feb2aaedf4681bb2d Parents: 0a3d4db Author: Aleksey Plekhanov <plehanov.a...@gmail.com> Authored: Thu Sep 27 10:53:08 2018 +0300 Committer: devozerov <voze...@gridgain.com> Committed: Thu Sep 27 10:53:08 2018 +0300 ---------------------------------------------------------------------- .../internal/processors/query/SqlSystemViewsSelfTest.java | 9 +++++++-- 1 file changed, 7 insertions(+), 2 deletions(-) ---------------------------------------------------------------------- http://git-wip-us.apache.org/repos/asf/ignite/blob/8ad6805f/modules/indexing/src/test/java/org/apache/ignite/internal/processors/query/SqlSystemViewsSelfTest.java ---------------------------------------------------------------------- diff --git a/modules/indexing/src/test/java/org/apache/ignite/internal/processors/query/SqlSystemViewsSelfTest.java b/modules/indexing/src/test/java/org/apache/ignite/internal/processors/query/SqlSystemViewsSelfTest.java index 1a4dae7..ccd0796 100644 --- a/modules/indexing/src/test/java/org/apache/ignite/internal/processors/query/SqlSystemViewsSelfTest.java +++ b/modules/indexing/src/test/java/org/apache/ignite/internal/processors/query/SqlSystemViewsSelfTest.java @@ -73,7 +73,7 @@ public class SqlSystemViewsSelfTest extends GridCommonAbstractTest { */ @SuppressWarnings("unchecked") private List<List<?>> execSql(Ignite ignite, String sql, Object ... args) { - IgniteCache cache = ignite.getOrCreateCache(DEFAULT_CACHE_NAME); + IgniteCache cache = ignite.cache(DEFAULT_CACHE_NAME); SqlFieldsQuery qry = new SqlFieldsQuery(sql); @@ -114,7 +114,7 @@ public class SqlSystemViewsSelfTest extends GridCommonAbstractTest { * Test system views modifications. */ public void testModifications() throws Exception { - startGrid(); + startGrid(getConfiguration()); assertSqlError("DROP TABLE IGNITE.NODES"); @@ -499,6 +499,11 @@ public class SqlSystemViewsSelfTest extends GridCommonAbstractTest { assertEquals("node2", res.get(0).get(0)); } + /** {@inheritDoc} */ + @Override protected IgniteConfiguration getConfiguration() throws Exception { + return super.getConfiguration().setCacheConfiguration(new CacheConfiguration().setName(DEFAULT_CACHE_NAME)); + } + /** * Gets ignite configuration with persistence enabled. */