@@ -527,24 +527,25 @@ private <T> void testInferDataType42P18(TestContext ctx, Class<T> type, T value,
527527  }
528528
529529  private  <T > void  testInferDataType42P18 (TestContext  ctx , Class <T > type , T  value , String  suffix1 , String  suffix2 ) {
530+     PgConnection .connect (vertx , options ()).onComplete (ctx .asyncAssertSuccess (conn  -> {
531+       conn 
532+         .preparedQuery ("SELECT CONCAT('HELLO ', $1)" ).execute (Tuple .of (value ))
533+         .map (rows  -> rows .iterator ().next ().getString (0 ))
534+         .eventually (() -> conn .close ())
535+         .onComplete (ctx .asyncAssertSuccess (str  -> {
536+           ctx .assertEquals ("HELLO "  + suffix1 , str );
537+         }));
538+     }));
530539    Object  array  = Array .newInstance (type , 1 );
531540    Array .set (array , 0 , value );
532541    PgConnection .connect (vertx , options ()).onComplete (ctx .asyncAssertSuccess (conn  -> {
533542      conn 
534-         .preparedQuery ("SELECT CONCAT('HELLO ', $1)" ).execute (Tuple .of (value ))
535-         .map (result1  -> {
536-           Row  row1  = result1 .iterator ().next ();
537-           ctx .assertEquals ("HELLO "  + suffix1 , row1 .getString (0 ));
538-           return  "" ;
539-         })
540-         .compose (v  -> conn .preparedQuery ("SELECT CONCAT('HELLO ', $1)" ).execute (Tuple .of (array )))
541-         .map (result2  -> {
542-           Row  row2  = result2 .iterator ().next ();
543-           String  v  = row2 .getString (0 );
544-           ctx .assertEquals ("HELLO "  + suffix2 , row2 .getString (0 ));
545-           return  "" ;
546-         })
547-         .eventually (() -> conn .close ());
543+         .preparedQuery ("SELECT CONCAT('HELLO ', $1)" ).execute (Tuple .of (array ))
544+         .map (rows  -> rows .iterator ().next ().getString (0 ))
545+         .eventually (() -> conn .close ())
546+         .onComplete (ctx .asyncAssertSuccess (str  -> {
547+           ctx .assertEquals ("HELLO "  + suffix2 , str );
548+         }));
548549    }));
549550  }
550551
0 commit comments