@@ -57,24 +57,24 @@ public class ServerKilledIT
57
57
@ Parameters (name = "{0} connections" )
58
58
public static Collection <Object []> data () {
59
59
return Arrays .asList (new Object [][] {
60
- { "plaintext" , Config .build (). withEncryptionLevel ( Config . EncryptionLevel .NONE ) },
61
- { "tls encrypted" , Config .build (). withEncryptionLevel ( Config . EncryptionLevel .REQUIRED ) }
60
+ { "plaintext" , Config .EncryptionLevel .NONE },
61
+ { "tls encrypted" , Config .EncryptionLevel .REQUIRED }
62
62
});
63
63
}
64
64
65
- private Config .ConfigBuilder configBuilder ;
65
+ private Config .EncryptionLevel encryptionLevel ;
66
66
67
- public ServerKilledIT ( String testName , Config .ConfigBuilder configBuilder )
67
+ public ServerKilledIT ( String testName , Config .EncryptionLevel encryptionLevel )
68
68
{
69
- this .configBuilder = configBuilder ;
69
+ this .encryptionLevel = encryptionLevel ;
70
70
}
71
71
72
72
@ Test
73
73
public void shouldRecoverFromServerRestart () throws Throwable
74
74
{
75
75
// Given
76
76
// config with sessionLivenessCheckTimeout not set, i.e. turned off
77
- Config config = configBuilder .toConfig ();
77
+ Config config = Config . build (). withEncryptionLevel ( encryptionLevel ) .toConfig ();
78
78
79
79
try ( Driver driver = GraphDatabase .driver ( Neo4jRunner .DEFAULT_URI , config ) )
80
80
{
@@ -113,7 +113,7 @@ public void shouldDropBrokenOldSessions() throws Throwable
113
113
{
114
114
// config with set liveness check timeout
115
115
int livenessCheckTimeoutMinutes = 10 ;
116
- Config config = configBuilder
116
+ Config config = Config . build (). withEncryptionLevel ( encryptionLevel )
117
117
.withConnectionLivenessCheckTimeout ( livenessCheckTimeoutMinutes , TimeUnit .MINUTES )
118
118
.toConfig ();
119
119
0 commit comments