@@ -5,7 +5,6 @@ import akka.testkit.{ImplicitSender, TestActor, TestActorRef, TestKit, TestProbe
5
5
import akka .util .Timeout
6
6
import common .StreamLogging
7
7
import org .apache .openwhisk .core .entity .SchedulerInstanceId
8
- import org .apache .openwhisk .core .etcd .EtcdClient
9
8
import org .junit .runner .RunWith
10
9
import org .scalamock .scalatest .MockFactory
11
10
import org .scalatest .concurrent .ScalaFutures
@@ -52,7 +51,6 @@ class DataManagementServiceTests
52
51
behavior of " DataManagementService"
53
52
54
53
it should " distribute work to etcd worker" in {
55
- val etcdClient = mock[EtcdClient ]
56
54
val watcherService = TestProbe ()
57
55
val worker = TestProbe ()
58
56
@@ -77,7 +75,6 @@ class DataManagementServiceTests
77
75
78
76
it should " handle request sequentially for a same key" in {
79
77
val queue = mutable.Queue .empty[String ]
80
- val etcdClient = mock[EtcdClient ]
81
78
val watcherService = TestProbe ()
82
79
val workerFactory = (f : ActorRefFactory ) =>
83
80
f.actorOf(Props (new Actor {
@@ -116,7 +113,6 @@ class DataManagementServiceTests
116
113
117
114
it should " handle request concurrently for different keys" in {
118
115
val queue = mutable.Queue .empty[String ]
119
- val etcdClient = mock[EtcdClient ]
120
116
val watcherService = TestProbe ()
121
117
val workerFactory = (f : ActorRefFactory ) =>
122
118
f.actorOf(Props (new Actor {
@@ -153,7 +149,6 @@ class DataManagementServiceTests
153
149
}
154
150
155
151
it should " remove unnecessary operation" in {
156
- val etcdClient = mock[EtcdClient ]
157
152
val watcherService = TestProbe ()
158
153
val worker = TestProbe ()
159
154
@@ -181,8 +176,6 @@ class DataManagementServiceTests
181
176
}
182
177
183
178
it should " register data when the target endpoint is removed" in {
184
- val etcdClient = mock[EtcdClient ]
185
-
186
179
val watcherService = TestProbe ()
187
180
val worker = TestProbe ()
188
181
val key = " testKey"
@@ -196,8 +189,6 @@ class DataManagementServiceTests
196
189
}
197
190
198
191
it should " ignore prefixed endpoint-removed results" in {
199
- val etcdClient = mock[EtcdClient ]
200
-
201
192
val watcherService = TestProbe ()
202
193
val worker = TestProbe ()
203
194
val key = " testKey"
@@ -210,8 +201,6 @@ class DataManagementServiceTests
210
201
}
211
202
212
203
it should " deregister data" in {
213
- val etcdClient = mock[EtcdClient ]
214
-
215
204
val watcherService = TestProbe ()
216
205
val worker = TestProbe ()
217
206
watcherService.setAutoPilot((sender, msg) => {
@@ -231,8 +220,6 @@ class DataManagementServiceTests
231
220
}
232
221
233
222
it should " store the resource data" in {
234
- val etcdClient = mock[EtcdClient ]
235
-
236
223
val watcherService = TestProbe ()
237
224
val worker = TestProbe ()
238
225
val key = " testKey"
@@ -246,8 +233,6 @@ class DataManagementServiceTests
246
233
}
247
234
248
235
it should " not store the resource data if there is no change from the last one" in {
249
- val etcdClient = mock[EtcdClient ]
250
-
251
236
val watcherService = TestProbe ()
252
237
val worker = TestProbe ()
253
238
val key = " testKey"
@@ -265,8 +250,6 @@ class DataManagementServiceTests
265
250
}
266
251
267
252
it should " store the resource data if there is change from the last one" in {
268
- val etcdClient = mock[EtcdClient ]
269
-
270
253
val watcherService = TestProbe ()
271
254
val worker = TestProbe ()
272
255
val key = " testKey"
0 commit comments