Examples of GridJdbcCheckpointSpi


Examples of org.gridgain.grid.spi.checkpoint.jdbc.GridJdbcCheckpointSpi

public class GridJdbcCheckpointSpiConfigSelfTest extends GridSpiAbstractConfigTest<GridJdbcCheckpointSpi> {
    /**
     * @throws Exception If failed.
     */
    public void testNegativeConfig() throws Exception {
        checkNegativeSpiProperty(new GridJdbcCheckpointSpi(), "dataSource", null);

        DataSource ds = new jdbcDataSource();

        GridJdbcCheckpointSpi spi = new GridJdbcCheckpointSpi();

        spi.setDataSource(ds);

        checkNegativeSpiProperty(spi, "checkpointTableName", null);
        checkNegativeSpiProperty(spi, "checkpointTableName", "");

        spi.setCheckpointTableName(DFLT_CHECKPOINT_TABLE_NAME);

        checkNegativeSpiProperty(spi, "keyFieldName", null);
        checkNegativeSpiProperty(spi, "keyFieldName", "");

        spi.setKeyFieldName(DFLT_KEY_FIELD_NAME);

        checkNegativeSpiProperty(spi, "keyFieldType", null);
        checkNegativeSpiProperty(spi, "keyFieldType", "");

        spi.setKeyFieldType(DFLT_KEY_FIELD_TYPE);

        checkNegativeSpiProperty(spi, "valueFieldName", null);
        checkNegativeSpiProperty(spi, "valueFieldName", "");

        spi.setValueFieldName(DFLT_VALUE_FIELD_NAME);

        checkNegativeSpiProperty(spi, "valueFieldType", null);
        checkNegativeSpiProperty(spi, "valueFieldType", "");

        spi.setValueFieldType(DFLT_VALUE_FIELD_TYPE);

        checkNegativeSpiProperty(spi, "expireDateFieldName", null);
        checkNegativeSpiProperty(spi, "expireDateFieldName", "");

        spi.setExpireDateFieldName(DFLT_EXPIRE_DATE_FIELD_NAME);

        checkNegativeSpiProperty(spi, "expireDateFieldType", null);
        checkNegativeSpiProperty(spi, "expireDateFieldType", "");
    }
View Full Code Here
TOP
Copyright © 2018 www.massapi.com. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.