Skip to content

Commit 5397152

Browse files
committed
Polishing.
Reformat integration test. See #573 Original pull request: #574.
1 parent b7f9d7c commit 5397152

File tree

1 file changed

+6
-4
lines changed

1 file changed

+6
-4
lines changed

src/test/java/org/springframework/data/r2dbc/core/PostgresIntegrationTests.java

+6-4
Original file line numberDiff line numberDiff line change
@@ -249,6 +249,7 @@ void shouldReadAndWriteGeoTypes() {
249249

250250
@Test // gh-573
251251
void shouldReadAndWriteInterval() {
252+
252253
EntityWithInterval entityWithInterval = new EntityWithInterval();
253254
entityWithInterval.interval = Interval.of(Duration.ofHours(3));
254255

@@ -261,11 +262,12 @@ void shouldReadAndWriteInterval() {
261262
R2dbcEntityTemplate template = new R2dbcEntityTemplate(client,
262263
new DefaultReactiveDataAccessStrategy(PostgresDialect.INSTANCE));
263264

264-
EntityWithInterval saved = template.insert(entityWithInterval).block();
265-
EntityWithInterval loaded = template.select(Query.empty(), EntityWithInterval.class) //
266-
.blockLast();
265+
template.insert(entityWithInterval).thenMany(template.select(Query.empty(), EntityWithInterval.class)) //
266+
.as(StepVerifier::create) //
267+
.consumeNextWith(actual -> {
267268

268-
assertThat(saved.interval).isEqualTo(loaded.interval);
269+
assertThat(actual.getInterval()).isEqualTo(entityWithInterval.interval);
270+
}).verifyComplete();
269271
}
270272

271273
private void insert(EntityWithArrays object) {

0 commit comments

Comments
 (0)