Search in sources :

Example 11 with DeploymentEvent

use of io.zeebe.client.event.DeploymentEvent in project zeebe by zeebe-io.

the class DeploymentClusteredTest method shouldDeployAfterRestartBroker.

@Test
public void shouldDeployAfterRestartBroker() {
    // given
    clusteringRule.createTopic("test", PARTITION_COUNT);
    // when
    clusteringRule.restartBroker(ClusteringRule.BROKER_3_CLIENT_ADDRESS);
    // then
    final DeploymentEvent deploymentEvent = client.workflows().deploy("test").addWorkflowModel(WORKFLOW, "workflow.bpmn").execute();
    assertThat(deploymentEvent.getDeployedWorkflows().size()).isEqualTo(1);
    assertThat(deploymentEvent.getErrorMessage()).isEmpty();
}
Also used : DeploymentEvent(io.zeebe.client.event.DeploymentEvent) Test(org.junit.Test)

Aggregations

DeploymentEvent (io.zeebe.client.event.DeploymentEvent)11 Test (org.junit.Test)8 ZeebeClient (io.zeebe.client.ZeebeClient)2 ClientCommandRejectedException (io.zeebe.client.cmd.ClientCommandRejectedException)2 WorkflowInstanceEvent (io.zeebe.client.event.WorkflowInstanceEvent)2 ExecuteCommandRequest (io.zeebe.test.broker.protocol.brokerapi.ExecuteCommandRequest)2 ClientProperties (io.zeebe.client.ClientProperties)1 ZeebeClientImpl (io.zeebe.client.impl.ZeebeClientImpl)1 ClientRule (io.zeebe.client.util.ClientRule)1 Bpmn (io.zeebe.model.bpmn.Bpmn)1 WorkflowDefinition (io.zeebe.model.bpmn.instance.WorkflowDefinition)1 Protocol (io.zeebe.protocol.Protocol)1 DEPLOYMENT_EVENT (io.zeebe.protocol.clientapi.EventType.DEPLOYMENT_EVENT)1 StubBrokerRule (io.zeebe.test.broker.protocol.brokerapi.StubBrokerRule)1 ByteArrayInputStream (java.io.ByteArrayInputStream)1 File (java.io.File)1 UTF_8 (java.nio.charset.StandardCharsets.UTF_8)1 java.util (java.util)1 Properties (java.util.Properties)1 Collectors (java.util.stream.Collectors)1