diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml index c98b410..7769317 100644 --- a/.github/workflows/build.yml +++ b/.github/workflows/build.yml @@ -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 \ No newline at end of file diff --git a/.github/workflows/deploy.yml b/.github/workflows/deploy.yml index ebcc080..9a86c43 100644 --- a/.github/workflows/deploy.yml +++ b/.github/workflows/deploy.yml @@ -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 }} \ No newline at end of file diff --git a/src/main/java/dev/vality/fraudbusters/mg/connector/service/HgClientService.java b/src/main/java/dev/vality/fraudbusters/mg/connector/service/HgClientService.java index 893065c..4d7e428 100644 --- a/src/main/java/dev/vality/fraudbusters/mg/connector/service/HgClientService.java +++ b/src/main/java/dev/vality/fraudbusters/mg/connector/service/HgClientService.java @@ -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!"); diff --git a/src/test/java/dev/vality/fraudbusters/mg/connector/FraudbustersMgConnectorApplicationTest.java b/src/test/java/dev/vality/fraudbusters/mg/connector/FraudbustersMgConnectorApplicationTest.java index 98db7ea..9beccb2 100644 --- a/src/test/java/dev/vality/fraudbusters/mg/connector/FraudbustersMgConnectorApplicationTest.java +++ b/src/test/java/dev/vality/fraudbusters/mg/connector/FraudbustersMgConnectorApplicationTest.java @@ -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