use of org.springframework.retry.RetryContext in project dhis2-core by dhis2.
the class MetadataSyncPostProcessorTest method testShouldSendSuccessEmailIfSyncSummaryIsError.
@Test
void testShouldSendSuccessEmailIfSyncSummaryIsError() {
metadataSyncSummary.setImportReport(new ImportReport());
metadataSyncSummary.getImportReport().setStatus(Status.ERROR);
metadataSyncSummary.setMetadataVersion(dataVersion);
MetadataRetryContext mockMetadataRetryContext = mock(MetadataRetryContext.class);
RetryContext mockRetryContext = mock(RetryContext.class);
when(mockMetadataRetryContext.getRetryContext()).thenReturn(mockRetryContext);
boolean status = metadataSyncPostProcessor.handleSyncNotificationsAndAbortStatus(metadataSyncSummary, mockMetadataRetryContext, dataVersion);
assertTrue(status);
}
use of org.springframework.retry.RetryContext in project dhis2-core by dhis2.
the class MetadataRetryContextTest method testShouldSetRetryContextCorrectly.
@Test
void testShouldSetRetryContextCorrectly() {
RetryContext newMock = mock(RetryContext.class);
metadataRetryContext.setRetryContext(newMock);
assertEquals(newMock, metadataRetryContext.getRetryContext());
}
Aggregations