File tree Expand file tree Collapse file tree 3 files changed +30
-0
lines changed
driver/src/test/java/org/neo4j/driver/v1 Expand file tree Collapse file tree 3 files changed +30
-0
lines changed Original file line number Diff line number Diff line change 19
19
package org .neo4j .driver .v1 .integration ;
20
20
21
21
import org .junit .After ;
22
+ import org .junit .AfterClass ;
22
23
import org .junit .Rule ;
23
24
import org .junit .Test ;
24
25
@@ -96,6 +97,12 @@ public void tearDown()
96
97
}
97
98
}
98
99
100
+ @ AfterClass
101
+ public static void stopSharedCluster ()
102
+ {
103
+ ClusterRule .stopSharedCluster ();
104
+ }
105
+
99
106
@ Test
100
107
public void shouldExecuteReadAndWritesWhenDriverSuppliedWithAddressOfLeader () throws Exception
101
108
{
Original file line number Diff line number Diff line change 19
19
package org .neo4j .driver .v1 .stress ;
20
20
21
21
import org .junit .After ;
22
+ import org .junit .AfterClass ;
22
23
import org .junit .Before ;
23
24
import org .junit .Rule ;
24
25
import org .junit .Test ;
57
58
import org .neo4j .driver .v1 .exceptions .SecurityException ;
58
59
import org .neo4j .driver .v1 .types .Node ;
59
60
import org .neo4j .driver .v1 .util .DaemonThreadFactory ;
61
+ import org .neo4j .driver .v1 .util .cc .ClusterRule ;
60
62
import org .neo4j .driver .v1 .util .cc .LocalOrRemoteClusterRule ;
61
63
62
64
import static java .util .Collections .newSetFromMap ;
@@ -108,6 +110,12 @@ public void tearDown() throws Exception
108
110
}
109
111
}
110
112
113
+ @ AfterClass
114
+ public static void stopSharedCluster ()
115
+ {
116
+ ClusterRule .stopSharedCluster ();
117
+ }
118
+
111
119
@ Test
112
120
public void basicStressTest () throws Throwable
113
121
{
Original file line number Diff line number Diff line change @@ -52,6 +52,21 @@ public AuthToken getDefaultAuthToken()
52
52
return AuthTokens .basic ( "neo4j" , PASSWORD );
53
53
}
54
54
55
+ public static void stopSharedCluster ()
56
+ {
57
+ if ( SharedCluster .exists () )
58
+ {
59
+ try
60
+ {
61
+ SharedCluster .stop ();
62
+ }
63
+ finally
64
+ {
65
+ SharedCluster .remove ();
66
+ }
67
+ }
68
+ }
69
+
55
70
@ Override
56
71
protected void before () throws Throwable
57
72
{
You can’t perform that action at this time.
0 commit comments