@@ -67,7 +67,7 @@ class ServerSessionPoolSpecification extends Specification {
67
67
def ' should get session' () {
68
68
given :
69
69
def cluster = Stub (Cluster ) {
70
- getDescription () >> connectedDescription
70
+ getCurrentDescription () >> connectedDescription
71
71
}
72
72
def pool = new ServerSessionPool (cluster)
73
73
@@ -81,7 +81,7 @@ class ServerSessionPoolSpecification extends Specification {
81
81
def ' should throw IllegalStateException if pool is closed' () {
82
82
given :
83
83
def cluster = Stub (Cluster ) {
84
- getDescription () >> connectedDescription
84
+ getCurrentDescription () >> connectedDescription
85
85
}
86
86
def pool = new ServerSessionPool (cluster)
87
87
pool. close()
@@ -96,7 +96,7 @@ class ServerSessionPoolSpecification extends Specification {
96
96
def ' should pool session' () {
97
97
given :
98
98
def cluster = Stub (Cluster ) {
99
- getDescription () >> connectedDescription
99
+ getCurrentDescription () >> connectedDescription
100
100
}
101
101
def pool = new ServerSessionPool (cluster)
102
102
def session = pool. get()
@@ -112,7 +112,7 @@ class ServerSessionPoolSpecification extends Specification {
112
112
def ' should prune sessions on release' () {
113
113
given :
114
114
def cluster = Mock (Cluster ) {
115
- getDescription () >> connectedDescription
115
+ getCurrentDescription () >> connectedDescription
116
116
}
117
117
def clock = Stub (ServerSessionPool.Clock ) {
118
118
millis() >>> [0 , 0 , // first get
@@ -156,7 +156,7 @@ class ServerSessionPoolSpecification extends Specification {
156
156
def ' should prune sessions when getting' () {
157
157
given :
158
158
def cluster = Mock (Cluster ) {
159
- getDescription () >> connectedDescription
159
+ getCurrentDescription () >> connectedDescription
160
160
}
161
161
def clock = Stub (ServerSessionPool.Clock ) {
162
162
millis() >>> [0 , 0 , // first get
@@ -185,11 +185,10 @@ class ServerSessionPoolSpecification extends Specification {
185
185
def ' should not prune session when timeout is null' () {
186
186
given :
187
187
def cluster = Stub (Cluster ) {
188
- getDescription () >> unconnectedDescription
188
+ getCurrentDescription () >> unconnectedDescription
189
189
}
190
190
def clock = Stub (ServerSessionPool.Clock ) {
191
- millis() >>> [0 , 0 ,
192
- MINUTES . toMillis(29 ) + 1 ]
191
+ millis() >>> [0 , 0 , 0 ]
193
192
}
194
193
def pool = new ServerSessionPool (cluster, clock)
195
194
def session = pool. get()
@@ -205,7 +204,7 @@ class ServerSessionPoolSpecification extends Specification {
205
204
def ' should initialize session' () {
206
205
given :
207
206
def cluster = Stub (Cluster ) {
208
- getDescription () >> connectedDescription
207
+ getCurrentDescription () >> connectedDescription
209
208
}
210
209
def clock = Stub (ServerSessionPool.Clock ) {
211
210
millis() >> 42
@@ -233,7 +232,7 @@ class ServerSessionPoolSpecification extends Specification {
233
232
getConnection() >> connection
234
233
}
235
234
def cluster = Mock (Cluster ) {
236
- getDescription () >> connectedDescription
235
+ getCurrentDescription () >> connectedDescription
237
236
}
238
237
def pool = new ServerSessionPool (cluster)
239
238
// check out sessions up the the endSessions batch size
0 commit comments