use of org.apache.ignite.testframework.GridTestUtils.RunnableX in project ignite by apache.
the class DynamicIndexAbstractBasicSelfTest method checkNoIndexIsCreatedForInlineSize.
/**
* Verifies that no index is created and an exception is thrown.
*
* @param inlineSize Inline size value in the CREATE INDEX statement.
* @param igniteQryErrorCode Expected error code in the thrown exception.
* @throws Exception If failed for any other reason than the expected exception.
*/
private void checkNoIndexIsCreatedForInlineSize(final int inlineSize, int igniteQryErrorCode) throws Exception {
assertIgniteSqlException(new RunnableX() {
@Override
public void runx() throws Exception {
QueryIndex idx = index(IDX_NAME_1, field(FIELD_NAME_1_ESCAPED));
idx.setInlineSize(inlineSize);
dynamicIndexCreate(CACHE_NAME, TBL_NAME, idx, false, 0);
}
}, igniteQryErrorCode);
assertNoIndex(CACHE_NAME, TBL_NAME, IDX_NAME_1);
}
use of org.apache.ignite.testframework.GridTestUtils.RunnableX in project ignite by apache.
the class DynamicIndexAbstractBasicSelfTest method checkNoIndexIsCreatedForParallelism.
/**
* Verifies that no index is created and an exception is thrown.
*
* @param parallel Parallelism level in the CREATE INDEX statement.
* @param igniteQryErrorCode Expected error code in the thrown exception.
* @throws Exception If failed for any other reason than the expected exception.
*/
private void checkNoIndexIsCreatedForParallelism(final int parallel, int igniteQryErrorCode) throws Exception {
assertIgniteSqlException(new RunnableX() {
@Override
public void runx() throws Exception {
QueryIndex idx = index(IDX_NAME_1, field(FIELD_NAME_1_ESCAPED));
dynamicIndexCreate(CACHE_NAME, TBL_NAME, idx, false, parallel);
}
}, igniteQryErrorCode);
assertNoIndex(CACHE_NAME, TBL_NAME, IDX_NAME_1);
}
use of org.apache.ignite.testframework.GridTestUtils.RunnableX in project ignite by apache.
the class DynamicIndexAbstractBasicSelfTest method checkDropNoIndex.
/**
* Check drop when there is no index.
*
* @param mode Mode.
* @param atomicityMode Atomicity mode.
* @param near Near flag.
* @throws Exception If failed.
*/
private void checkDropNoIndex(CacheMode mode, CacheAtomicityMode atomicityMode, boolean near) throws Exception {
initialize(mode, atomicityMode, near);
assertIgniteSqlException(new RunnableX() {
@Override
public void runx() throws Exception {
dynamicIndexDrop(CACHE_NAME, IDX_NAME_1, false);
}
}, IgniteQueryErrorCode.INDEX_NOT_FOUND);
dynamicIndexDrop(CACHE_NAME, IDX_NAME_1, true);
assertNoIndex(CACHE_NAME, TBL_NAME, IDX_NAME_1);
}
Aggregations