Skip to content

Commit 7456a31

Browse files
authored
[Kaizen] Unflake RegularSyncSpec (#1045)
1 parent 0bc2292 commit 7456a31

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
@@ -87,6 +87,8 @@ class RegularSyncSpec
8787
def sync[T <: Fixture](test: => T): Future[Assertion] =
8888
Future {
8989
test
90+
// this makes sure that actors are all done after the test (believe me, afterEach does not work with mocks)
91+
TestKit.shutdownActorSystem(testSystem)
9092
succeed
9193
}
9294

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

0 commit comments

Comments
 (0)