Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Upgrading to spring boot 3.2.2 #67

Merged
merged 3 commits into from
Feb 26, 2024
Merged
Show file tree
Hide file tree
Changes from 2 commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
37 changes: 24 additions & 13 deletions pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@
<parent>
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-starter-parent</artifactId>
<version>2.6.6</version>
<version>3.2.2</version>
</parent>

<properties>
Expand All @@ -30,7 +30,7 @@
<dependency>
<groupId>com.google.cloud</groupId>
<artifactId>spring-cloud-gcp-dependencies</artifactId>
<version>2.0.3</version>
<version>4.9.0</version>
<type>pom</type>
<scope>import</scope>
</dependency>
Expand Down Expand Up @@ -66,12 +66,12 @@
<dependency>
<groupId>uk.gov.ons.ssdc</groupId>
<artifactId>ssdc-rm-common-entity-model</artifactId>
<version>4.18.0</version>
<version>4.19.0-SNAPSHOT</version>
</dependency>
<dependency>
<groupId>uk.gov.ons.ssdc</groupId>
<artifactId>ssdc-shared-sample-validation</artifactId>
<version>1.6.1</version>
<version>1.6.2-SNAPSHOT</version>
</dependency>

<dependency>
Expand All @@ -98,9 +98,9 @@
<version>1.2.5</version>
</dependency>
<dependency>
<groupId>com.vladmihalcea</groupId>
<artifactId>hibernate-types-55</artifactId>
<version>2.12.1</version>
<groupId>io.hypersistence</groupId>
<artifactId>hypersistence-utils-hibernate-63</artifactId>
<version>3.7.0</version>
</dependency>
<dependency>
<groupId>com.fasterxml.jackson.datatype</groupId>
Expand All @@ -110,6 +110,17 @@
<groupId>com.fasterxml.jackson.datatype</groupId>
<artifactId>jackson-datatype-jdk8</artifactId>
</dependency>
<dependency>
<groupId>jakarta.xml.bind</groupId>
<artifactId>jakarta.xml.bind-api</artifactId>
<version>4.0.0</version>
</dependency>
<dependency>
<groupId>javax.xml.bind</groupId>
<artifactId>jaxb-api</artifactId>
<version>2.3.0</version>
</dependency>


<!-- Test Dependencies below this point -->
<dependency>
Expand All @@ -128,9 +139,9 @@
</exclusions>
</dependency>
<dependency>
<groupId>com.mashape.unirest</groupId>
<groupId>com.konghq</groupId>
<artifactId>unirest-java</artifactId>
<version>1.4.9</version>
<version>3.14.5</version>
<scope>test</scope>
</dependency>
<dependency>
Expand All @@ -140,9 +151,9 @@
<scope>test</scope>
</dependency>
<dependency>
<groupId>com.github.tomakehurst</groupId>
<artifactId>wiremock-jre8</artifactId>
<version>2.27.0</version>
<groupId>org.wiremock</groupId>
<artifactId>wiremock</artifactId>
<version>3.3.1</version>
<scope>test</scope>
</dependency>
<dependency>
Expand All @@ -158,7 +169,7 @@
<extension>
<groupId>com.google.cloud.artifactregistry</groupId>
<artifactId>artifactregistry-maven-wagon</artifactId>
<version>2.1.1</version>
<version>2.2.1</version>
</extension>
</extensions>
<plugins>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -5,8 +5,8 @@
import com.google.cloud.spring.pubsub.support.PublisherFactory;
import com.google.cloud.spring.pubsub.support.SubscriberFactory;
import com.google.cloud.spring.pubsub.support.converter.JacksonPubSubMessageConverter;
import jakarta.annotation.PostConstruct;
import java.util.TimeZone;
import javax.annotation.PostConstruct;
import org.springframework.beans.factory.annotation.Value;
import org.springframework.context.annotation.Bean;
import org.springframework.context.annotation.Configuration;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -4,11 +4,11 @@
import com.godaddy.logging.LoggerFactory;
import com.google.cloud.spring.pubsub.core.PubSubTemplate;
import java.util.List;
import java.util.concurrent.CompletableFuture;
import java.util.concurrent.TimeUnit;
import org.springframework.stereotype.Component;
import org.springframework.transaction.annotation.Propagation;
import org.springframework.transaction.annotation.Transactional;
import org.springframework.util.concurrent.ListenableFuture;
import uk.gov.ons.ssdc.common.model.entity.Job;
import uk.gov.ons.ssdc.common.model.entity.JobRow;
import uk.gov.ons.ssdc.common.model.entity.JobRowStatus;
Expand Down Expand Up @@ -46,7 +46,7 @@ public void processChunk(Job job) {

for (JobRow jobRow : jobRows) {
try {
ListenableFuture<String> future =
CompletableFuture<String> future =
pubSubTemplate.publish(
jobTypeProcessor.getTopic(),
jobTypeProcessor
Expand Down
2 changes: 1 addition & 1 deletion src/main/resources/application.yml
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ spring:
hikari:
maximumPoolSize: 50
jpa:
database-platform: org.hibernate.dialect.PostgreSQL10Dialect
database-platform: org.hibernate.dialect.PostgreSQLDialect
hibernate:
ddl-auto: validate
properties:
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -9,13 +9,13 @@

import com.google.cloud.spring.pubsub.core.PubSubTemplate;
import java.util.List;
import java.util.concurrent.CompletableFuture;
import org.junit.jupiter.api.Test;
import org.junit.jupiter.api.extension.ExtendWith;
import org.mockito.ArgumentCaptor;
import org.mockito.InjectMocks;
import org.mockito.Mock;
import org.mockito.junit.jupiter.MockitoExtension;
import org.springframework.util.concurrent.ListenableFuture;
import uk.gov.ons.ssdc.common.model.entity.CollectionExercise;
import uk.gov.ons.ssdc.common.model.entity.Job;
import uk.gov.ons.ssdc.common.model.entity.JobRow;
Expand Down Expand Up @@ -73,9 +73,9 @@ void processChunk() {
when(transformer.transformRow(job, jobRow, columnValidators, jobTypeProcessor.getTopic()))
.thenReturn(messageToPublish);

ListenableFuture<String> listenableFuture = mock(ListenableFuture.class);
CompletableFuture<String> completableFuture = mock(CompletableFuture.class);
when(pubSubTemplate.publish(jobTypeProcessor.getTopic(), messageToPublish))
.thenReturn(listenableFuture);
.thenReturn(completableFuture);

// When
underTest.processChunk(job);
Expand Down
Loading