use of org.apache.ignite.internal.IgniteEx in project ignite by apache.
the class DynamicColumnsAbstractConcurrentSelfTest method testOperationChaining.
/**
* Test operations join.
*
* @throws Exception If failed.
*/
public void testOperationChaining() throws Exception {
// 7 nodes * 2 columns = 14 latch countdowns.
CountDownLatch finishLatch = new CountDownLatch(14);
IgniteEx srv1 = ignitionStart(serverConfiguration(1), finishLatch);
ignitionStart(serverConfiguration(2), finishLatch);
ignitionStart(serverConfiguration(3, true), finishLatch);
ignitionStart(clientConfiguration(4), finishLatch);
createSqlCache(srv1);
run(srv1, createSql);
CountDownLatch idxLatch = blockIndexing(srv1);
QueryField c0 = c("ID", Integer.class.getName());
QueryField c1 = c("NAME", String.class.getName());
QueryField c2 = c("age", Integer.class.getName());
QueryField c3 = c("city", String.class.getName());
IgniteInternalFuture<?> colFut1 = addCols(srv1, QueryUtils.DFLT_SCHEMA, c2);
IgniteInternalFuture<?> colFut2 = dropCols(srv1, QueryUtils.DFLT_SCHEMA, c1.name());
IgniteInternalFuture<?> colFut3 = addCols(srv1, QueryUtils.DFLT_SCHEMA, c3);
U.await(idxLatch);
// Start even more nodes of different flavors
ignitionStart(serverConfiguration(5), finishLatch);
ignitionStart(serverConfiguration(6, true), finishLatch);
ignitionStart(clientConfiguration(7), finishLatch);
assert !colFut1.isDone();
assert !colFut2.isDone();
assert !colFut3.isDone();
unblockIndexing(srv1);
colFut1.get();
colFut2.get();
colFut3.get();
U.await(finishLatch);
checkTableState(srv1, QueryUtils.DFLT_SCHEMA, TBL_NAME, c0, c2, c3);
}
use of org.apache.ignite.internal.IgniteEx in project ignite by apache.
the class GridPartitionedCacheJtaLookupClassNameSelfTest method testIncompatibleTmLookup.
/**
*/
@IgniteIgnore(value = "https://issues.apache.org/jira/browse/IGNITE-1094", forceFailure = true)
public void testIncompatibleTmLookup() {
final IgniteEx ignite = grid(0);
final CacheConfiguration cacheCfg = new CacheConfiguration(DEFAULT_CACHE_NAME);
cacheCfg.setName("Foo");
cacheCfg.setAtomicityMode(CacheAtomicityMode.TRANSACTIONAL);
cacheCfg.setTransactionManagerLookupClassName(TestTmLookup2.class.getName());
GridTestUtils.assertThrows(log, new Callable<Object>() {
@Override
public Object call() throws IgniteException {
ignite.createCache(cacheCfg);
return null;
}
}, IgniteException.class, null);
}
use of org.apache.ignite.internal.IgniteEx in project ignite by apache.
the class IgfsProcessorSelfTest method beforeTest.
/**
* {@inheritDoc}
*/
@Override
protected void beforeTest() throws Exception {
IgniteEx grid = grid(0);
igfs = grid.fileSystem(igfsName());
FileSystemConfiguration[] cfgs = grid.configuration().getFileSystemConfiguration();
assert cfgs.length == 1;
metaCacheName = cfgs[0].getMetaCacheConfiguration().getName();
metaCache = ((IgniteKernal) grid).internalCache(metaCacheName);
}
use of org.apache.ignite.internal.IgniteEx in project ignite by apache.
the class IgfsProcessorValidationSelfTest method testPreConfiguredCache.
/**
* @throws Exception If failed.
*/
public void testPreConfiguredCache() throws Exception {
FileSystemConfiguration igfsCfg1 = new FileSystemConfiguration(g1IgfsCfg1);
igfsCfg1.setName("igfs");
g1Cfg.setFileSystemConfiguration(igfsCfg1);
CacheConfiguration ccfgData = dataCache(1024);
ccfgData.setRebalanceTimeout(10001);
CacheConfiguration ccfgMeta = metaCache();
ccfgMeta.setRebalanceTimeout(10002);
igfsCfg1.setDataCacheConfiguration(ccfgData);
igfsCfg1.setMetaCacheConfiguration(ccfgMeta);
IgniteEx g = (IgniteEx) G.start(g1Cfg);
assertEquals(10001, g.cachex(g.igfsx("igfs").configuration().getDataCacheConfiguration().getName()).configuration().getRebalanceTimeout());
assertEquals(10002, g.cachex(g.igfsx("igfs").configuration().getMetaCacheConfiguration().getName()).configuration().getRebalanceTimeout());
}
use of org.apache.ignite.internal.IgniteEx in project ignite by apache.
the class H2DynamicTableSelfTest method testDropTable.
/**
* Test that {@code DROP TABLE} actually removes specified cache and type descriptor on all nodes.
* @throws Exception if failed.
*/
public void testDropTable() throws Exception {
execute("CREATE TABLE IF NOT EXISTS \"Person\" (\"id\" int, \"city\" varchar," + " \"name\" varchar, \"surname\" varchar, \"age\" int, PRIMARY KEY (\"id\", \"city\")) WITH " + "\"template=cache\"");
execute("DROP TABLE \"Person\"");
for (int i = 0; i < 4; i++) {
IgniteEx node = grid(i);
assertNull(node.cache("Person"));
QueryTypeDescriptorImpl desc = type(node, "Person", "Person");
assertNull(desc);
}
}
Aggregations