Skip to content

Commit

Permalink
MODROLESKC-262: add SqlMergeMode annotation
Browse files Browse the repository at this point in the history
  • Loading branch information
yauhen-vavilkin committed Jan 24, 2025
1 parent f5d0244 commit 3272763
Show file tree
Hide file tree
Showing 3 changed files with 7 additions and 2 deletions.
3 changes: 3 additions & 0 deletions src/test/java/org/folio/roles/base/BaseIntegrationTest.java
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,7 @@
import static org.folio.test.TestUtils.asJsonString;
import static org.springframework.http.MediaType.APPLICATION_JSON;
import static org.springframework.test.annotation.DirtiesContext.ClassMode.AFTER_CLASS;
import static org.springframework.test.context.jdbc.SqlMergeMode.MergeMode.MERGE;
import static org.springframework.test.web.servlet.request.MockMvcRequestBuilders.delete;
import static org.springframework.test.web.servlet.request.MockMvcRequestBuilders.get;
import static org.springframework.test.web.servlet.request.MockMvcRequestBuilders.post;
Expand Down Expand Up @@ -38,6 +39,7 @@
import org.springframework.test.annotation.DirtiesContext;
import org.springframework.test.context.ActiveProfiles;
import org.springframework.test.context.TestExecutionListeners;
import org.springframework.test.context.jdbc.SqlMergeMode;
import org.springframework.test.web.servlet.ResultActions;
import org.springframework.test.web.servlet.request.MockHttpServletRequestBuilder;

Expand All @@ -50,6 +52,7 @@
@ActiveProfiles("it")
@AutoConfigureMockMvc
@DirtiesContext(classMode = AFTER_CLASS)
@SqlMergeMode(MERGE)
@Import(BaseIntegrationTest.TopicConfiguration.class)
@TestExecutionListeners(listeners = {WireMockExecutionListener.class, KeycloakExecutionListener.class},
mergeMode = TestExecutionListeners.MergeMode.MERGE_WITH_DEFAULTS)
Expand Down
2 changes: 0 additions & 2 deletions src/test/java/org/folio/roles/it/KafkaMessageListenerIT.java
Original file line number Diff line number Diff line change
Expand Up @@ -75,7 +75,6 @@
import org.springframework.kafka.core.KafkaTemplate;
import org.springframework.test.context.bean.override.mockito.MockitoSpyBean;
import org.springframework.test.context.jdbc.Sql;
import org.springframework.test.context.jdbc.SqlMergeMode;
import org.testcontainers.shaded.org.awaitility.Awaitility;
import org.testcontainers.shaded.org.awaitility.core.ConditionFactory;

Expand All @@ -85,7 +84,6 @@
"classpath:/sql/truncate-permission-table.sql",
"classpath:/sql/truncate-capability-tables.sql",
})
@SqlMergeMode(SqlMergeMode.MergeMode.MERGE)
class KafkaMessageListenerIT extends BaseIntegrationTest {

@Autowired private KafkaTemplate<String, Object> kafkaTemplate;
Expand Down
4 changes: 4 additions & 0 deletions src/test/resources/application-it.yml
Original file line number Diff line number Diff line change
Expand Up @@ -46,3 +46,7 @@ folio:
username: test
password: test

logging:
level:
org.springframework.test.context.jdbc: debug
org.springframework.jdbc.datasource.init: debug

0 comments on commit 3272763

Please sign in to comment.