use of io.camunda.zeebe.gateway.protocol.GatewayOuterClass.UpdateJobRetriesResponse in project zeebe by camunda.
the class UpdateJobRetriesTest method shouldMapRequestAndResponse.
@Test
public void shouldMapRequestAndResponse() {
// given
final UpdateJobRetriesStub stub = new UpdateJobRetriesStub();
stub.registerWith(brokerClient);
final int retries = 123;
final UpdateJobRetriesRequest request = UpdateJobRetriesRequest.newBuilder().setJobKey(stub.getKey()).setRetries(retries).build();
// when
final UpdateJobRetriesResponse response = client.updateJobRetries(request);
// then
assertThat(response).isNotNull();
final BrokerUpdateJobRetriesRequest brokerRequest = brokerClient.getSingleBrokerRequest();
assertThat(brokerRequest.getKey()).isEqualTo(stub.getKey());
assertThat(brokerRequest.getIntent()).isEqualTo(JobIntent.UPDATE_RETRIES);
assertThat(brokerRequest.getValueType()).isEqualTo(ValueType.JOB);
final JobRecord brokerRequestValue = brokerRequest.getRequestWriter();
assertThat(brokerRequestValue.getRetries()).isEqualTo(retries);
}
use of io.camunda.zeebe.gateway.protocol.GatewayOuterClass.UpdateJobRetriesResponse in project zeebe by zeebe-io.
the class UpdateJobRetriesTest method shouldMapRequestAndResponse.
@Test
public void shouldMapRequestAndResponse() {
// given
final UpdateJobRetriesStub stub = new UpdateJobRetriesStub();
stub.registerWith(brokerClient);
final int retries = 123;
final UpdateJobRetriesRequest request = UpdateJobRetriesRequest.newBuilder().setJobKey(stub.getKey()).setRetries(retries).build();
// when
final UpdateJobRetriesResponse response = client.updateJobRetries(request);
// then
assertThat(response).isNotNull();
final BrokerUpdateJobRetriesRequest brokerRequest = brokerClient.getSingleBrokerRequest();
assertThat(brokerRequest.getKey()).isEqualTo(stub.getKey());
assertThat(brokerRequest.getIntent()).isEqualTo(JobIntent.UPDATE_RETRIES);
assertThat(brokerRequest.getValueType()).isEqualTo(ValueType.JOB);
final JobRecord brokerRequestValue = brokerRequest.getRequestWriter();
assertThat(brokerRequestValue.getRetries()).isEqualTo(retries);
}
use of io.camunda.zeebe.gateway.protocol.GatewayOuterClass.UpdateJobRetriesResponse in project zeebe by camunda-cloud.
the class UpdateJobRetriesTest method shouldMapRequestAndResponse.
@Test
public void shouldMapRequestAndResponse() {
// given
final UpdateJobRetriesStub stub = new UpdateJobRetriesStub();
stub.registerWith(brokerClient);
final int retries = 123;
final UpdateJobRetriesRequest request = UpdateJobRetriesRequest.newBuilder().setJobKey(stub.getKey()).setRetries(retries).build();
// when
final UpdateJobRetriesResponse response = client.updateJobRetries(request);
// then
assertThat(response).isNotNull();
final BrokerUpdateJobRetriesRequest brokerRequest = brokerClient.getSingleBrokerRequest();
assertThat(brokerRequest.getKey()).isEqualTo(stub.getKey());
assertThat(brokerRequest.getIntent()).isEqualTo(JobIntent.UPDATE_RETRIES);
assertThat(brokerRequest.getValueType()).isEqualTo(ValueType.JOB);
final JobRecord brokerRequestValue = brokerRequest.getRequestWriter();
assertThat(brokerRequestValue.getRetries()).isEqualTo(retries);
}
Aggregations