@@ -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()
@@ -97,7 +97,7 @@ class ServerSessionPoolSpecification extends Specification {
97
97
def ' should pool session' () {
98
98
given :
99
99
def cluster = Stub (Cluster ) {
100
- getDescription () >> connectedDescription
100
+ getCurrentDescription () >> connectedDescription
101
101
}
102
102
def pool = new ServerSessionPool (cluster)
103
103
def session = pool. get()
@@ -113,7 +113,7 @@ class ServerSessionPoolSpecification extends Specification {
113
113
def ' should prune sessions on release' () {
114
114
given :
115
115
def cluster = Mock (Cluster ) {
116
- getDescription () >> connectedDescription
116
+ getCurrentDescription () >> connectedDescription
117
117
}
118
118
def clock = Stub (ServerSessionPool.Clock ) {
119
119
millis() >>> [0 , 0 , // first get
@@ -157,7 +157,7 @@ class ServerSessionPoolSpecification extends Specification {
157
157
def ' should prune sessions when getting' () {
158
158
given :
159
159
def cluster = Mock (Cluster ) {
160
- getDescription () >> connectedDescription
160
+ getCurrentDescription () >> connectedDescription
161
161
}
162
162
def clock = Stub (ServerSessionPool.Clock ) {
163
163
millis() >>> [0 , 0 , // first get
@@ -186,11 +186,10 @@ class ServerSessionPoolSpecification extends Specification {
186
186
def ' should not prune session when timeout is null' () {
187
187
given :
188
188
def cluster = Stub (Cluster ) {
189
- getDescription () >> unconnectedDescription
189
+ getCurrentDescription () >> unconnectedDescription
190
190
}
191
191
def clock = Stub (ServerSessionPool.Clock ) {
192
- millis() >>> [0 , 0 ,
193
- MINUTES . toMillis(29 ) + 1 ]
192
+ millis() >>> [0 , 0 , 0 ]
194
193
}
195
194
def pool = new ServerSessionPool (cluster, clock)
196
195
def session = pool. get()
@@ -207,7 +206,7 @@ class ServerSessionPoolSpecification extends Specification {
207
206
def ' should initialize session' () {
208
207
given :
209
208
def cluster = Stub (Cluster ) {
210
- getDescription () >> connectedDescription
209
+ getCurrentDescription () >> connectedDescription
211
210
}
212
211
def clock = Stub (ServerSessionPool.Clock ) {
213
212
millis() >> 42
@@ -235,7 +234,7 @@ class ServerSessionPoolSpecification extends Specification {
235
234
getConnection() >> connection
236
235
}
237
236
def cluster = Mock (Cluster ) {
238
- getDescription () >> connectedDescription
237
+ getCurrentDescription () >> connectedDescription
239
238
}
240
239
def pool = new ServerSessionPool (cluster)
241
240
// check out sessions up the the endSessions batch size
0 commit comments