File tree 1 file changed +6
-4
lines changed
src/test/java/org/springframework/data/r2dbc/core
1 file changed +6
-4
lines changed Original file line number Diff line number Diff line change @@ -249,6 +249,7 @@ void shouldReadAndWriteGeoTypes() {
249
249
250
250
@ Test // gh-573
251
251
void shouldReadAndWriteInterval () {
252
+
252
253
EntityWithInterval entityWithInterval = new EntityWithInterval ();
253
254
entityWithInterval .interval = Interval .of (Duration .ofHours (3 ));
254
255
@@ -261,11 +262,12 @@ void shouldReadAndWriteInterval() {
261
262
R2dbcEntityTemplate template = new R2dbcEntityTemplate (client ,
262
263
new DefaultReactiveDataAccessStrategy (PostgresDialect .INSTANCE ));
263
264
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 -> {
267
268
268
- assertThat (saved .interval ).isEqualTo (loaded .interval );
269
+ assertThat (actual .getInterval ()).isEqualTo (entityWithInterval .interval );
270
+ }).verifyComplete ();
269
271
}
270
272
271
273
private void insert (EntityWithArrays object ) {
You can’t perform that action at this time.
0 commit comments