@@ -33,14 +33,11 @@ import org.scalatest.matchers.should.Matchers
33
33
import scodec .bits .BitVector
34
34
35
35
import io .iohk .ethereum .NormalPatience
36
- import io .iohk .ethereum .WithActorSystemShutDown
37
36
import io .iohk .ethereum .db .storage .KnownNodesStorage
38
37
import io .iohk .ethereum .utils .Config
39
38
40
39
class PeerDiscoveryManagerSpec
41
- extends TestKit (ActorSystem (" PeerDiscoveryManagerSpec_System" ))
42
- with AnyFlatSpecLike
43
- with WithActorSystemShutDown
40
+ extends AnyFlatSpecLike
44
41
with Matchers
45
42
with Eventually
46
43
with MockFactory
@@ -64,6 +61,7 @@ class PeerDiscoveryManagerSpec
64
61
).map(new java.net.URI (_)).map(Node .fromUri)
65
62
66
63
trait Fixture {
64
+ implicit lazy val system : ActorSystem = ActorSystem (" PeerDiscoveryManagerSpec_System" )
67
65
lazy val discoveryConfig = defaultConfig
68
66
lazy val knownNodesStorage : KnownNodesStorage = mock[KnownNodesStorage ]
69
67
lazy val discoveryService : DiscoveryService = mock[DiscoveryService ]
@@ -93,7 +91,10 @@ class PeerDiscoveryManagerSpec
93
91
94
92
def test (fixture : Fixture ): Unit =
95
93
try fixture.test()
96
- finally system.stop(fixture.peerDiscoveryManager)
94
+ finally {
95
+ fixture.system.stop(fixture.peerDiscoveryManager)
96
+ TestKit .shutdownActorSystem(fixture.system, verifySystemShutdown = true )
97
+ }
97
98
98
99
def toENode (node : Node ): ENode =
99
100
ENode (
0 commit comments