Skip to content

Commit

Permalink
MODBULKOPS-459 - TD: fix unstable testReceiveJobExecutionUpdate unit …
Browse files Browse the repository at this point in the history
…test (#342)

* MODBULKOPS-459 - TD: fix unstable testReceiveJobExecutionUpdate unit test

* MODBULKOPS-459 - TD: fix unstable testReceiveJobExecutionUpdate unit test

* MODBULKOPS-459 - TD: fix unstable testReceiveJobExecutionUpdate unit test

* MODBULKOPS-459 - TD: fix unstable testReceiveJobExecutionUpdate unit test

* MODBULKOPS-459 - TD: fix unstable testReceiveJobExecutionUpdate unit test
  • Loading branch information
khandramai authored Jan 13, 2025
1 parent 37fed38 commit 9c5e822
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 9c5e822

Please sign in to comment.