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

deps: bump com.google.cloud:libraries-bom from 26.30.0 to 26.31.0 #2565

Merged
merged 11 commits into from
Feb 5, 2024
Original file line number Diff line number Diff line change
Expand Up @@ -24,6 +24,7 @@
import java.lang.reflect.Method;
import java.lang.reflect.Modifier;
import java.lang.reflect.ParameterizedType;
import java.util.Arrays;
import org.junit.jupiter.api.Test;

/** Tests to check for new mapping methods that appear in the Spanner client lib. */
Expand All @@ -33,6 +34,14 @@ class SpannerWriteMethodCoverageTests {
@Test
void allKnownMappingTypesTest() throws NoSuchFieldException {
for (Method method : ValueBinder.class.getMethods()) {
// TODO: https://github.com/GoogleCloudPlatform/spring-cloud-gcp/issues/2574
// Until this is implemented, ignore the new column types by ignoring the methods
// that have the new column types as a parameter
if (Arrays.stream(method.getParameterTypes()).map(Class::getName)
.anyMatch(x -> x.contains("ProtocolMessageEnum")
|| x.contains("AbstractMessage"))) {
continue;
}

String methodName = method.getName();

Expand Down
2 changes: 1 addition & 1 deletion spring-cloud-gcp-dependencies/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,7 @@
</distributionManagement>

<properties>
<gcp-libraries-bom.version>26.30.0</gcp-libraries-bom.version>
<gcp-libraries-bom.version>26.31.0</gcp-libraries-bom.version>
<cloud-sql-socket-factory.version>1.14.1</cloud-sql-socket-factory.version>
<r2dbc-postgres-driver.version>1.0.4.RELEASE</r2dbc-postgres-driver.version>
<cloud-spanner-r2dbc.version>1.3.0</cloud-spanner-r2dbc.version>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -50,6 +50,7 @@ public void setUp() throws IOException {
ApiCallContext mockContext = mock(ApiCallContext.class);
when(mockTransportChannel.getEmptyCallContext()).thenReturn(mockContext);
when(mockContext.withTransportChannel(any())).thenReturn(mockContext);
when(mockContext.withEndpointContext(any())).thenReturn(mockContext);
factory.setChannelProvider(mockChannelProvider);
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -769,6 +769,7 @@ void createSubscriberStubSucceeds() {
when(this.mockTransportChannel.getEmptyCallContext()).thenReturn(this.mockApiCallContext);
when(this.mockApiCallContext.withCredentials(any())).thenReturn(this.mockApiCallContext);
when(this.mockApiCallContext.withTransportChannel(any())).thenReturn(this.mockApiCallContext);
when(this.mockApiCallContext.withEndpointContext(any())).thenReturn(this.mockApiCallContext);

GcpProjectIdProvider projectIdProvider = () -> "project";
DefaultSubscriberFactory factory =
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -195,6 +195,7 @@ void testCustomTransportChannelProviderUsedWhenProvided() throws IOException {
when(mockTransportChannel.getEmptyCallContext()).thenReturn(mockApiCallContext);
when(mockApiCallContext.withCredentials(any())).thenReturn(mockApiCallContext);
when(mockApiCallContext.withTransportChannel(any())).thenReturn(mockApiCallContext);
when(mockApiCallContext.withEndpointContext(any())).thenReturn(mockApiCallContext);

contextRunner
.withBean(
Expand Down
Loading