Skip to content

Commit

Permalink
Merge d168222 into f32bb27
Browse files Browse the repository at this point in the history
  • Loading branch information
blemale committed Jun 5, 2021
2 parents f32bb27 + d168222 commit e4d651c
Showing 1 changed file with 14 additions and 0 deletions.
14 changes: 14 additions & 0 deletions src/test/scala/com/github/blemale/scaffeine/ScaffeineSpec.scala
Expand Up @@ -182,6 +182,20 @@ class ScaffeineSpec extends AnyWordSpec with Matchers with PrivateMethodTester {
removalListener shouldNot be(null)
}

"set eviction listener" in {
val scaffeine =
Scaffeine().evictionListener((_: Any, _: Any, _) => println("evicted"))

val getEvictionListener =
PrivateMethod[caffeine.cache.RemovalListener[Any, Any]](
'getEvictionListener
)
val evictionListener =
scaffeine.underlying invokePrivate getEvictionListener(false)

evictionListener shouldNot be(null)
}

"set record stats" in {
val scaffeine = Scaffeine().recordStats()

Expand Down

0 comments on commit e4d651c

Please sign in to comment.