use of io.spine.server.projection.BulkWriteOperation in project core-java by SpineEventEngine.
the class BulkWriteOperationShould method fail_to_complete_twice.
@Test(expected = IllegalStateException.class)
public void fail_to_complete_twice() {
final BulkWriteOperation operation = newOperation();
assertTrue(operation.isInProgress());
operation.complete();
assertFalse(operation.isInProgress());
operation.complete();
}
use of io.spine.server.projection.BulkWriteOperation in project core-java by SpineEventEngine.
the class BulkWriteOperationShould method do_nothing_if_checked_before_completion_time.
@Test
public void do_nothing_if_checked_before_completion_time() {
final BulkWriteOperation operation = newOperation();
assertTrue(operation.isInProgress());
operation.checkExpiration();
assertTrue(operation.isInProgress());
}
use of io.spine.server.projection.BulkWriteOperation in project core-java by SpineEventEngine.
the class BulkWriteOperationShould method exit_silently_if_cheked_after_completion.
@Test
public void exit_silently_if_cheked_after_completion() {
final BulkWriteOperation operation = newOperation();
operation.complete();
assertFalse(operation.isInProgress());
operation.checkExpiration();
assertFalse(operation.isInProgress());
}
use of io.spine.server.projection.BulkWriteOperation in project core-java by SpineEventEngine.
the class BulkWriteOperationShould method initialize_with_proper_delay_and_callback.
@Test
public void initialize_with_proper_delay_and_callback() {
final Duration duration = Durations2.seconds(60);
final BulkWriteOperation operation = new BulkWriteOperation<>(duration, new EmptyCallback());
assertNotNull(operation);
}
Aggregations