Skip to content

Commit

Permalink
fix for 2.12
Browse files Browse the repository at this point in the history
  • Loading branch information
adamw committed Jan 8, 2025
1 parent 48d3b7a commit f2ba934
Showing 1 changed file with 3 additions and 3 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@ class CachingBackendTest extends AnyFlatSpec with Matchers {

def timePassed(seconds: Int): Unit = {
now += seconds
storage.filterInPlace { case (_, (_, ttl)) => ttl >= now }
storage = storage.filter { case (_, (_, ttl)) => ttl >= now }
}

override def get(key: Array[Byte]): Option[Array[Byte]] = storage.get(key.toList).map(_._1)
Expand Down Expand Up @@ -82,11 +82,11 @@ class CachingBackendTest extends AnyFlatSpec with Matchers {
responseC.body shouldBe responseA.body

// D: request to another endpoint
val _ = cachingBackend.send(request2)
cachingBackend.send(request2)
invocationCounter shouldBe 3

// E: another request to another endpoint, which shouldn't be cached
val _ = cachingBackend.send(request2)
cachingBackend.send(request2)
invocationCounter shouldBe 4
}

Expand Down

0 comments on commit f2ba934

Please sign in to comment.