Skip to content

Commit 8107cc6

Browse files
committed
[Kaizen] Unflake RegularSynchSpec
1 parent f97c6bf commit 8107cc6

File tree

1 file changed

+3
-1
lines changed

1 file changed

+3
-1
lines changed

src/test/scala/io/iohk/ethereum/blockchain/sync/regular/RegularSyncSpec.scala

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -86,6 +86,8 @@ class RegularSyncSpec
8686
def sync[T <: Fixture](test: => T): Future[Assertion] =
8787
Future {
8888
test
89+
// this makes sure that actors are all done after the test (believe me, afterEach does not work with mocks)
90+
TestKit.shutdownActorSystem(testSystem)
8991
succeed
9092
}
9193

@@ -474,7 +476,7 @@ class RegularSyncSpec
474476
peersClient.setAutoPilot(new PeersClientAutoPilot)
475477
override lazy val branchResolution: BranchResolution = stub[BranchResolution]
476478
(blockchainReader.getBestBlockNumber _).when().returns(0)
477-
(branchResolution.resolveBranch _).when(*).returns(NewBetterBranch(Nil)).repeat(10)
479+
(branchResolution.resolveBranch _).when(*).returns(NewBetterBranch(Nil)).atLeastOnce()
478480
(blockImport
479481
.importBlock(_: Block)(_: Scheduler))
480482
.when(*, *)

0 commit comments

Comments
 (0)