use of io.camunda.zeebe.util.sched.future.ActorFuture in project zeebe by camunda.
the class ActorFutureTest method shouldInvokeCallbackOnEmptyFutureList.
@Test
public void shouldInvokeCallbackOnEmptyFutureList() {
// given
final List<ActorFuture<Void>> futures = Collections.emptyList();
final List<Throwable> invocations = new ArrayList<>();
final Actor waitingActor = new Actor() {
@Override
protected void onActorStarted() {
actor.runOnCompletion(futures, t -> {
invocations.add(t);
});
}
};
schedulerRule.submitActor(waitingActor);
schedulerRule.workUntilDone();
// then
assertThat(invocations).hasSize(1).containsNull();
}
use of io.camunda.zeebe.util.sched.future.ActorFuture in project zeebe by zeebe-io.
the class ActorFutureTest method shouldInvokeCallbackOnEmptyFutureList.
@Test
public void shouldInvokeCallbackOnEmptyFutureList() {
// given
final List<ActorFuture<Void>> futures = Collections.emptyList();
final List<Throwable> invocations = new ArrayList<>();
final Actor waitingActor = new Actor() {
@Override
protected void onActorStarted() {
actor.runOnCompletion(futures, t -> {
invocations.add(t);
});
}
};
schedulerRule.submitActor(waitingActor);
schedulerRule.workUntilDone();
// then
assertThat(invocations).hasSize(1).containsNull();
}
use of io.camunda.zeebe.util.sched.future.ActorFuture in project zeebe by camunda-cloud.
the class ActorFutureTest method shouldInvokeCallbackOnEmptyFutureList.
@Test
public void shouldInvokeCallbackOnEmptyFutureList() {
// given
final List<ActorFuture<Void>> futures = Collections.emptyList();
final List<Throwable> invocations = new ArrayList<>();
final Actor waitingActor = new Actor() {
@Override
protected void onActorStarted() {
actor.runOnCompletion(futures, t -> {
invocations.add(t);
});
}
};
schedulerRule.submitActor(waitingActor);
schedulerRule.workUntilDone();
// then
assertThat(invocations).hasSize(1).containsNull();
}
Aggregations