Search in sources :

Example 1 with CustomByteArrayOutputStream

use of com.hazelcast.jet.impl.util.AsyncSnapshotWriterImpl.CustomByteArrayOutputStream in project hazelcast by hazelcast.

the class AsyncSnapshotWriterImplTest method when_bufferExceeded_then_thrown.

/* ***********************************/
/* CustomByteArrayOutputStream tests */
/* ***********************************/
@Test
public void when_bufferExceeded_then_thrown() {
    // Given
    CustomByteArrayOutputStream os = new CustomByteArrayOutputStream(4);
    os.write(1);
    os.write(1);
    os.write(1);
    os.write(1);
    // Then
    exception.expect(RuntimeException.class);
    // When
    os.write(1);
}
Also used : CustomByteArrayOutputStream(com.hazelcast.jet.impl.util.AsyncSnapshotWriterImpl.CustomByteArrayOutputStream) ParallelJVMTest(com.hazelcast.test.annotation.ParallelJVMTest) QuickTest(com.hazelcast.test.annotation.QuickTest) Test(org.junit.Test)

Aggregations

CustomByteArrayOutputStream (com.hazelcast.jet.impl.util.AsyncSnapshotWriterImpl.CustomByteArrayOutputStream)1 ParallelJVMTest (com.hazelcast.test.annotation.ParallelJVMTest)1 QuickTest (com.hazelcast.test.annotation.QuickTest)1 Test (org.junit.Test)1