Search in sources :

Example 1 with IgniteDataTransferObject

use of org.apache.ignite.internal.dto.IgniteDataTransferObject in project gridgain by gridgain.

the class GridCommandHandlerIndexingCheckSizeTest method testNoNpeInToString.

/**
 * Test checks that there will be no {@link NullPointerException}
 * when calling {@link Object#toString} for {@link ValidateIndexesCheckSizeIssue}
 * and {@link ValidateIndexesCheckSizeResult}.
 */
@Test
public void testNoNpeInToString() {
    List<IgniteDataTransferObject> transferObjects = asList(new ValidateIndexesCheckSizeIssue(), new ValidateIndexesCheckSizeIssue(null, 0, null), new ValidateIndexesCheckSizeIssue("idx", 0, null), new ValidateIndexesCheckSizeIssue(null, 0, new Exception("error")), new ValidateIndexesCheckSizeIssue("idx", 0, new Exception("error")), // 
    new ValidateIndexesCheckSizeResult(), new ValidateIndexesCheckSizeResult(0, null), new ValidateIndexesCheckSizeResult(0, emptyList()), new ValidateIndexesCheckSizeResult(0, asList(new ValidateIndexesCheckSizeIssue())));
    // there should be no npe
    log.info("transferObjects=" + transferObjects);
}
Also used : ValidateIndexesCheckSizeIssue(org.apache.ignite.internal.visor.verify.ValidateIndexesCheckSizeIssue) IgniteDataTransferObject(org.apache.ignite.internal.dto.IgniteDataTransferObject) ValidateIndexesCheckSizeResult(org.apache.ignite.internal.visor.verify.ValidateIndexesCheckSizeResult) IgniteCheckedException(org.apache.ignite.IgniteCheckedException) IgniteException(org.apache.ignite.IgniteException) Test(org.junit.Test)

Aggregations

IgniteCheckedException (org.apache.ignite.IgniteCheckedException)1 IgniteException (org.apache.ignite.IgniteException)1 IgniteDataTransferObject (org.apache.ignite.internal.dto.IgniteDataTransferObject)1 ValidateIndexesCheckSizeIssue (org.apache.ignite.internal.visor.verify.ValidateIndexesCheckSizeIssue)1 ValidateIndexesCheckSizeResult (org.apache.ignite.internal.visor.verify.ValidateIndexesCheckSizeResult)1 Test (org.junit.Test)1