Skip to content

Commit 7fc1d2c

Browse files
committed
Fix readUnmatachableTypesTest
1 parent e45ca49 commit 7fc1d2c

File tree

1 file changed

+8
-2
lines changed

1 file changed

+8
-2
lines changed

spring-cloud-gcp-data-spanner/src/test/java/com/google/cloud/spring/data/spanner/core/convert/ConverterAwareMappingSpannerEntityReaderTests.java

Lines changed: 8 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -273,9 +273,15 @@ void readUnmatachableTypesTest() {
273273
Struct struct =
274274
Struct.newBuilder().set("fieldWithUnsupportedType").to(Value.string("key1")).build();
275275

276-
assertThatThrownBy(() -> this.spannerEntityReader.read(FaultyTestEntity.class, struct))
276+
assertThatThrownBy(() -> this.spannerEntityReader.read(
277+
FaultyTestEntity.class,
278+
struct,
279+
java.util.Set.of("id"),
280+
false
281+
))
277282
.isInstanceOf(SpannerDataException.class)
278-
.hasMessage("Unable to read column from Cloud Spanner results: id");
283+
.hasMessageContaining("Unable to read column from Cloud Spanner results")
284+
.hasMessageEndingWith(": id");
279285
}
280286

281287
@Test

0 commit comments

Comments
 (0)