37
37
import org .neo4j .driver .internal .logging .DevNullLogging ;
38
38
import org .neo4j .driver .internal .logging .JULogging ;
39
39
import org .neo4j .driver .internal .logging .Slf4jLogging ;
40
- import org .neo4j .driver .internal .metrics .MetricsProvider ;
41
40
import org .neo4j .driver .net .ServerAddressResolver ;
42
41
import org .neo4j .driver .util .TestUtil ;
43
42
@@ -395,31 +394,29 @@ void shouldSetMetricsAdapter()
395
394
@ Nested
396
395
class SerializationTest
397
396
{
398
-
399
397
@ Test
400
398
void shouldSerialize () throws Exception
401
399
{
402
400
Config config = Config .builder ()
403
401
.withMaxConnectionPoolSize ( 123 )
404
- .withConnectionTimeout ( 6543L , TimeUnit .MILLISECONDS )
405
- .withConnectionAcquisitionTimeout ( 5432L , TimeUnit .MILLISECONDS )
406
- .withConnectionLivenessCheckTimeout ( 4321L , TimeUnit .MILLISECONDS )
407
- .withMaxConnectionLifetime ( 4711 , TimeUnit .MILLISECONDS )
408
- .withMaxTransactionRetryTime ( 3210L , TimeUnit .MILLISECONDS )
409
- .withFetchSize ( 9876L )
410
- .withEventLoopThreads ( 4 )
411
- .withoutEncryption ()
412
- .withTrustStrategy ( Config .TrustStrategy .trustCustomCertificateSignedBy ( new File ( "doesntMatter" )) )
413
- .withUserAgent ( "user-agent" )
414
- .withDriverMetrics ()
415
- .withRoutingTablePurgeDelay ( 50000 , TimeUnit .MILLISECONDS )
416
- .withLeakedSessionsLogging ()
417
- .withMetricsAdapter ( MetricsAdapter .MICROMETER )
418
- .build ();
402
+ .withConnectionTimeout ( 6543L , TimeUnit .MILLISECONDS )
403
+ .withConnectionAcquisitionTimeout ( 5432L , TimeUnit .MILLISECONDS )
404
+ .withConnectionLivenessCheckTimeout ( 4321L , TimeUnit .MILLISECONDS )
405
+ .withMaxConnectionLifetime ( 4711 , TimeUnit .MILLISECONDS )
406
+ .withMaxTransactionRetryTime ( 3210L , TimeUnit .MILLISECONDS )
407
+ .withFetchSize ( 9876L )
408
+ .withEventLoopThreads ( 4 )
409
+ .withoutEncryption ()
410
+ .withTrustStrategy ( Config .TrustStrategy .trustCustomCertificateSignedBy ( new File ( "doesntMatter" ) ) )
411
+ .withUserAgent ( "user-agent" )
412
+ .withDriverMetrics ()
413
+ .withRoutingTablePurgeDelay ( 50000 , TimeUnit .MILLISECONDS )
414
+ .withLeakedSessionsLogging ()
415
+ .withMetricsAdapter ( MetricsAdapter .MICROMETER )
416
+ .build ();
419
417
420
418
Config verify = TestUtil .serializeAndReadBack ( config , Config .class );
421
419
422
-
423
420
assertEquals ( config .maxConnectionPoolSize (), verify .maxConnectionPoolSize () );
424
421
assertEquals ( config .connectionTimeoutMillis (), verify .connectionTimeoutMillis () );
425
422
assertEquals ( config .connectionAcquisitionTimeoutMillis (), verify .connectionAcquisitionTimeoutMillis () );
@@ -445,7 +442,6 @@ void shouldSerialize() throws Exception
445
442
@ Test
446
443
void shouldSerializeSerializableLogging () throws IOException , ClassNotFoundException
447
444
{
448
-
449
445
Config config = Config .builder ().withLogging ( Logging .javaUtilLogging ( Level .ALL ) ).build ();
450
446
451
447
Config verify = TestUtil .serializeAndReadBack ( config , Config .class );
0 commit comments