Add pending (#32)

This commit is contained in:
struga 2024-05-27 09:51:26 +03:00 committed by GitHub
parent 154c519f04
commit f8694312a5
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
4 changed files with 11 additions and 4 deletions

View File

@ -7,6 +7,6 @@ on:
jobs:
build:
uses: valitydev/base-workflow/.github/workflows/maven-service-build.yml@v1
uses: valitydev/java-workflow/.github/workflows/maven-service-build.yml@v1
with:
ignore-coverage: true

View File

@ -8,7 +8,7 @@ on:
jobs:
deploy:
uses: valitydev/base-workflow/.github/workflows/maven-service-deploy.yml@v1
uses: valitydev/java-workflow/.github/workflows/maven-service-deploy.yml@v1
secrets:
github-token: ${{ secrets.GITHUB_TOKEN }}
mm-webhook-url: ${{ secrets.MATTERMOST_WEBHOOK_URL }}

View File

@ -46,6 +46,7 @@ public class HgClientService {
long sequenceId) {
InvoicePaymentWrapper invoicePaymentWrapper = new InvoicePaymentWrapper();
try {
log.info("invoiceId: {} sequenceId: {}", invoiceId, sequenceId);
Invoice invoiceInfo = invoicingClient.get(invoiceId, eventRangeFactory.create(sequenceId));
if (invoiceInfo == null) {
throw new PaymentInfoNotFoundException("Not found invoice info in hg!");

View File

@ -74,8 +74,12 @@ public class FraudbustersMgConnectorApplicationTest extends KafkaAbstractTest {
String sourceIdRefund2 = "sourceIdRefund2";
mockPayment(sourceIdRefund2);
mockRefund(sourceIdRefund2, 7, "1");
mockRefund(sourceIdRefund2, 8, "2");
mockRefund(sourceIdRefund2, 7, "2");
mockRefund(sourceIdRefund2, 9, "2");
mockRefund(sourceIdRefund2, 2, "2");
mockRefund(sourceIdRefund2, 3, "2");
mockRefund(sourceIdRefund2, 7, "1");
sinkEvents = MgEventSinkFlowGenerator.generateRefundedFlow(sourceIdRefund2);
sinkEvents.forEach(sinkEvent -> produceMessageToEventSink(MG_EVENT, sinkEvent));
@ -84,6 +88,8 @@ public class FraudbustersMgConnectorApplicationTest extends KafkaAbstractTest {
String sourceChargeback = "source_chargeback";
sinkEvents = MgEventSinkFlowGenerator.generateChargebackFlow(sourceChargeback);
mockPayment(sourceChargeback);
mockChargeback(sourceChargeback, 2, "1");
mockChargeback(sourceChargeback, 3, "1");
mockChargeback(sourceChargeback, 6, "1");
sinkEvents.forEach(sinkEvent -> produceMessageToEventSink(MG_EVENT, sinkEvent));
@ -93,7 +99,7 @@ public class FraudbustersMgConnectorApplicationTest extends KafkaAbstractTest {
sinkEvents = MgEventSinkFlowGenerator.generateSuccessFlow(SOURCE_ID);
mockPaymentWithException(SOURCE_ID);
sinkEvents.forEach(sinkEvent -> produceMessageToEventSink(MG_EVENT, sinkEvent));
checkMessageInTopic(PAYMENT, PaymentDeserializer.class, 6);
checkMessageInTopic(PAYMENT, PaymentDeserializer.class, 10);
}
@Test