@@ -188,7 +188,7 @@ void buildWhenDerivedFromPoolReturnsNewNonPooledConnectionFactory() {
188
188
@ SuppressWarnings ({ "rawtypes" , "unchecked" })
189
189
@ MethodSource ("poolingConnectionProviderOptions" )
190
190
void optionIsMappedWhenCreatingPoolConfiguration (Option option ) {
191
- String url = "r2dbc:pool:h2:mem:///" + UUID .randomUUID (). toString () ;
191
+ String url = "r2dbc:pool:h2:mem:///" + UUID .randomUUID ();
192
192
ExpectedOption expectedOption = ExpectedOption .get (option );
193
193
ConnectionFactoryOptions options = ConnectionFactoryBuilder .withUrl (url ).configure ((builder ) -> builder
194
194
.option (PoolingConnectionFactoryProvider .POOL_NAME , "defaultName" ).option (option , expectedOption .value ))
@@ -202,7 +202,7 @@ void optionIsMappedWhenCreatingPoolConfiguration(Option option) {
202
202
@ SuppressWarnings ({ "rawtypes" , "unchecked" })
203
203
@ MethodSource ("poolingConnectionProviderOptions" )
204
204
void stringlyTypedOptionIsMappedWhenCreatingPoolConfiguration (Option option ) {
205
- String url = "r2dbc:pool:h2:mem:///" + UUID .randomUUID (). toString () ;
205
+ String url = "r2dbc:pool:h2:mem:///" + UUID .randomUUID ();
206
206
ExpectedOption expectedOption = ExpectedOption .get (option );
207
207
ConnectionFactoryOptions options = ConnectionFactoryBuilder .withUrl (url )
208
208
.configure ((builder ) -> builder .option (PoolingConnectionFactoryProvider .POOL_NAME , "defaultName" )
@@ -213,21 +213,21 @@ void stringlyTypedOptionIsMappedWhenCreatingPoolConfiguration(Option option) {
213
213
assertThat (configuration ).extracting (expectedOption .property ).isEqualTo (expectedOption .value );
214
214
}
215
215
216
- private void assertMatchingOptions (ConnectionFactoryOptions actualOptions , ConnectionFactoryOptions expectedOptions ,
217
- Option <?>... optionsToCheck ) {
218
- for (Option <?> option : optionsToCheck ) {
219
- assertThat (actualOptions .getValue (option )).as (option .name ()).isEqualTo (expectedOptions .getValue (option ));
220
- }
221
- }
222
-
223
216
private static Iterable <Arguments > poolingConnectionProviderOptions () {
224
217
List <Arguments > arguments = new ArrayList <>();
225
218
ReflectionUtils .doWithFields (PoolingConnectionFactoryProvider .class ,
226
- (field ) -> arguments .add (Arguments .of (( Option <?>) ReflectionUtils .getField (field , null ))),
219
+ (field ) -> arguments .add (Arguments .of (ReflectionUtils .getField (field , null ))),
227
220
(field ) -> Option .class .equals (field .getType ()));
228
221
return arguments ;
229
222
}
230
223
224
+ private void assertMatchingOptions (ConnectionFactoryOptions actualOptions , ConnectionFactoryOptions expectedOptions ,
225
+ Option <?>... optionsToCheck ) {
226
+ for (Option <?> option : optionsToCheck ) {
227
+ assertThat (actualOptions .getValue (option )).as (option .name ()).isEqualTo (expectedOptions .getValue (option ));
228
+ }
229
+ }
230
+
231
231
private enum ExpectedOption {
232
232
233
233
ACQUIRE_RETRY (PoolingConnectionFactoryProvider .ACQUIRE_RETRY , 4 , "acquireRetry" ),
0 commit comments