Skip to content

Commit

Permalink
fix(tests): Adapt AutoPurgeActorSpec to slow builds
Browse files Browse the repository at this point in the history
* Allow a longer timeout while waiting on PurgeComplete.
  It seems that the travis build is slow w.r.t. curator
  test cluster so that the default timeout of 3s can
  occur.

Change-Id: I5948293c0a71fa622a1e9e29139a2ebc84c167fd
  • Loading branch information
Robin Wolters authored and bsikander committed Jul 8, 2019
1 parent 9c84c97 commit 4e94910
Showing 1 changed file with 3 additions and 3 deletions.
Expand Up @@ -119,7 +119,7 @@ class AutoPurgeActorSpec extends TestKit(AutoPurgeActorSpec.system) with FunSpec

purgeActor ! AutoPurgeActor.PurgeOldData

expectMsg(AutoPurgeActor.PurgeComplete)
expectMsg(timeout, AutoPurgeActor.PurgeComplete)
Await.result(dao.getJobs(100, None), timeout).size should equal(0)
Await.result(dao.getContexts(None, None), timeout).size should equal(0)
}
Expand All @@ -136,7 +136,7 @@ class AutoPurgeActorSpec extends TestKit(AutoPurgeActorSpec.system) with FunSpec

purgeActor ! AutoPurgeActor.PurgeOldData

expectMsg(AutoPurgeActor.PurgeComplete)
expectMsg(timeout, AutoPurgeActor.PurgeComplete)
Await.result(dao.getJobs(100, None), timeout) should equal(Seq(recentJob))
Await.result(dao.getContexts(None, None), timeout) should equal(Seq(recentContext))
}
Expand All @@ -153,7 +153,7 @@ class AutoPurgeActorSpec extends TestKit(AutoPurgeActorSpec.system) with FunSpec

purgeActor ! AutoPurgeActor.PurgeOldData

expectMsg(AutoPurgeActor.PurgeComplete)
expectMsg(timeout, AutoPurgeActor.PurgeComplete)
Await.result(dao.getJobs(100, None), timeout) should equal(Seq(runningJob))
Await.result(dao.getContexts(None, None), timeout) should equal(Seq(runningContext))
}
Expand Down

0 comments on commit 4e94910

Please sign in to comment.