File tree Expand file tree Collapse file tree 1 file changed +6
-4
lines changed
src/test/java/org/springframework/data/r2dbc/core Expand file tree Collapse file tree 1 file changed +6
-4
lines changed Original file line number Diff line number Diff 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 ) {
You can’t perform that action at this time.
0 commit comments