From a15e33b35346781ee51e929876c56f7a820d9854 Mon Sep 17 00:00:00 2001 From: Steven Sheehy <17552371+steven-sheehy@users.noreply.github.com> Date: Thu, 19 Sep 2024 14:50:41 -0500 Subject: [PATCH] Bump Spring Boot from 3.3.3 to 3.3.4 (#9413) * Bump Spring Boot from 3.3.3 to 3.3.4 * Bump protobuf from 3.25.3 to 3.25.5 * Fix a flaky test * Remove Spring Framework override --------- Signed-off-by: Steven Sheehy --- build.gradle.kts | 5 +++-- buildSrc/build.gradle.kts | 2 +- .../importer/migration/SidecarContractMigrationTest.java | 9 +++++++-- 3 files changed, 11 insertions(+), 5 deletions(-) diff --git a/build.gradle.kts b/build.gradle.kts index dd9b75c8d79..d9355ff377d 100644 --- a/build.gradle.kts +++ b/build.gradle.kts @@ -36,9 +36,8 @@ extra.apply { set("jooq.version", "3.19.6") set("mapStructVersion", "1.6.1") set("nodeJsVersion", "18.18.0") - set("protobufVersion", "3.25.3") + set("protobufVersion", "3.25.5") set("reactorGrpcVersion", "1.2.4") - set("spring-framework.version", "6.1.13") set("vertxVersion", "4.5.10") set("tuweniVersion", "2.3.1") } @@ -63,6 +62,8 @@ dependencies { api("com.google.cloud:spring-cloud-gcp-dependencies:5.6.0") api("com.google.guava:guava:33.3.0-jre") api("com.google.protobuf:protobuf-java:$protobufVersion") + // Temporary until new spring-cloud-gcp-starter-pubsub + api("com.google.protobuf:protobuf-java-util:$protobufVersion") api("com.graphql-java-generator:graphql-java-client-runtime:2.8") api("com.graphql-java:graphql-java-extended-scalars:22.0") api("com.graphql-java:graphql-java-extended-validation:22.0") diff --git a/buildSrc/build.gradle.kts b/buildSrc/build.gradle.kts index f7dc1d09e80..c4ff6c20edd 100644 --- a/buildSrc/build.gradle.kts +++ b/buildSrc/build.gradle.kts @@ -51,7 +51,7 @@ dependencies { implementation("org.openapitools:openapi-generator-gradle-plugin:7.8.0") implementation("org.owasp:dependency-check-gradle:10.0.4") implementation("org.sonarsource.scanner.gradle:sonarqube-gradle-plugin:5.1.0.4882") - implementation("org.springframework.boot:spring-boot-gradle-plugin:3.3.3") + implementation("org.springframework.boot:spring-boot-gradle-plugin:3.3.4") implementation("org.testcontainers:postgresql:1.20.1") implementation("com.github.kselveliev:web3j-gradle-plugin:4.12.0") } diff --git a/hedera-mirror-importer/src/test/java/com/hedera/mirror/importer/migration/SidecarContractMigrationTest.java b/hedera-mirror-importer/src/test/java/com/hedera/mirror/importer/migration/SidecarContractMigrationTest.java index ba88a0bdfec..759c2af8b06 100644 --- a/hedera-mirror-importer/src/test/java/com/hedera/mirror/importer/migration/SidecarContractMigrationTest.java +++ b/hedera-mirror-importer/src/test/java/com/hedera/mirror/importer/migration/SidecarContractMigrationTest.java @@ -36,6 +36,7 @@ import java.util.Collections; import java.util.HashMap; import java.util.List; +import java.util.TreeSet; import lombok.RequiredArgsConstructor; import org.junit.jupiter.api.Test; import org.springframework.jdbc.core.JdbcTemplate; @@ -97,10 +98,12 @@ void migrateEntityTypeToContract() { var contractBytecodesMap = new HashMap(); var contractBytecodeBuilder = ContractBytecode.newBuilder(); var contractIdBuilder = ContractID.newBuilder(); + var expected = new TreeSet(); for (int i = 0; i < 66000; i++) { var entity = domainBuilder.entity().get(); var entityId = entity.getId(); + expected.add(entityId); entities.add(entity); contracts.add( @@ -128,13 +131,15 @@ void migrateEntityTypeToContract() { .containsOnly(CONTRACT); var contractsIterator = contractRepository.findAll().iterator(); + var ids = new TreeSet(); contractsIterator.forEachRemaining(savedContract -> { - var contractBytecode = contractBytecodesMap.remove(savedContract.getId()); + ids.add(savedContract.getId()); + var contractBytecode = contractBytecodesMap.get(savedContract.getId()); assertThat(DomainUtils.toBytes(contractBytecode.getRuntimeBytecode())) .isEqualTo(savedContract.getRuntimeBytecode()); }); assertThat(contractsIterator).isExhausted(); - assertThat(contractBytecodesMap).isEmpty(); + assertThat(ids).isEqualTo(expected); } // These persist methods are not functionally necessary but greatly speed up bulk insertion.