mirror of
https://github.com/valitydev/disputes-api.git
synced 2024-11-06 00:55:23 +00:00
fix TimerProperties
This commit is contained in:
parent
ad8b3e10d9
commit
8841105dc5
6
pom.xml
6
pom.xml
@ -250,6 +250,12 @@
|
||||
<version>4.1.3</version>
|
||||
<scope>test</scope>
|
||||
</dependency>
|
||||
<dependency>
|
||||
<groupId>dev.vality</groupId>
|
||||
<artifactId>testcontainers-annotations</artifactId>
|
||||
<version>2.0.3</version>
|
||||
<scope>test</scope>
|
||||
</dependency>
|
||||
</dependencies>
|
||||
|
||||
<build>
|
||||
|
@ -1,7 +1,7 @@
|
||||
package dev.vality.disputes.polling;
|
||||
|
||||
import dev.vality.adapter.flow.lib.model.PollingInfo;
|
||||
import dev.vality.adapter.flow.lib.utils.TimerProperties;
|
||||
import dev.vality.disputes.config.properties.DisputesTimerProperties;
|
||||
import dev.vality.disputes.domain.tables.pojos.Dispute;
|
||||
import lombok.RequiredArgsConstructor;
|
||||
import org.springframework.stereotype.Service;
|
||||
@ -18,7 +18,7 @@ import static dev.vality.disputes.utils.OptionsExtractors.extractMaxTimePolling;
|
||||
@RequiredArgsConstructor
|
||||
public class PollingInfoService {
|
||||
|
||||
private final TimerProperties timerProperties;
|
||||
private final DisputesTimerProperties timerProperties;
|
||||
|
||||
public PollingInfo initPollingInfo(Dispute dispute, Map<String, String> options) {
|
||||
return initPollingInfo(convert(dispute), options);
|
||||
|
@ -99,3 +99,7 @@ dispute:
|
||||
time:
|
||||
config:
|
||||
max-time-polling-min: 600
|
||||
|
||||
testcontainers:
|
||||
postgresql:
|
||||
tag: '11.4'
|
||||
|
26
src/test/java/dev/vality/disputes/dao/DisputeDaoTest.java
Normal file
26
src/test/java/dev/vality/disputes/dao/DisputeDaoTest.java
Normal file
@ -0,0 +1,26 @@
|
||||
package dev.vality.disputes.dao;
|
||||
|
||||
import dev.vality.disputes.domain.tables.pojos.Dispute;
|
||||
import dev.vality.testcontainers.annotations.DefaultSpringBootTest;
|
||||
import dev.vality.testcontainers.annotations.postgresql.PostgresqlTestcontainerSingleton;
|
||||
import org.junit.jupiter.api.Test;
|
||||
import org.springframework.beans.factory.annotation.Autowired;
|
||||
|
||||
import static dev.vality.testcontainers.annotations.util.RandomBeans.random;
|
||||
import static org.junit.jupiter.api.Assertions.assertEquals;
|
||||
|
||||
@PostgresqlTestcontainerSingleton
|
||||
@DefaultSpringBootTest
|
||||
public class DisputeDaoTest {
|
||||
|
||||
@Autowired
|
||||
private DisputeDao disputeDao;
|
||||
|
||||
@Test
|
||||
public void insertAndFindAdjustmentEventTest() {
|
||||
var random = random(Dispute.class);
|
||||
disputeDao.save(random);
|
||||
assertEquals(random,
|
||||
disputeDao.get(random.getId(), random.getInvoiceId(), random.getPaymentId()));
|
||||
}
|
||||
}
|
Loading…
Reference in New Issue
Block a user