Skip to content

Commit

Permalink
Merge branch 'master' into MODBULKOPS-428
Browse files Browse the repository at this point in the history
  • Loading branch information
siarhei-charniak authored Jan 13, 2025
2 parents da8f890 + 9c5e822 commit 6111683
Showing 1 changed file with 5 additions and 6 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -34,11 +34,10 @@ class DataImportJobCompletionReceiverServiceTest extends BaseTest {
void testReceiveJobExecutionUpdate() {
var topic = "folio.Default.diku.DI_JOB_COMPLETED";
var event = Files.readString(Path.of("src/test/resources/files/kafka/data_import_job_completed_message.json"));

kafkaTemplate.send(topic, OBJECT_MAPPER.readValue(event, Event.class));

var dataImportJobProfileIdCaptor = ArgumentCaptor.forClass(UUID.class);
Awaitility.await().atMost(10, TimeUnit.SECONDS).untilAsserted(() -> verify(bulkOperationService, times(1))
.processDataImportResult(dataImportJobProfileIdCaptor.capture()));
kafkaTemplate.send(topic, OBJECT_MAPPER.readValue(event, Event.class)).thenAccept(result -> {
var dataImportJobProfileIdCaptor = ArgumentCaptor.forClass(UUID.class);
Awaitility.await().atMost(20, TimeUnit.SECONDS).untilAsserted(() -> verify(bulkOperationService, times(1))
.processDataImportResult(dataImportJobProfileIdCaptor.capture()));
});
}
}

0 comments on commit 6111683

Please sign in to comment.