Skip to content

Commit

Permalink
Merge branch 'main' into bastien.lemale/chore_update_caffeine_version
Browse files Browse the repository at this point in the history
  • Loading branch information
mergify[bot] authored Jul 10, 2024
2 parents 25add8b + 2672c82 commit c4a6656
Show file tree
Hide file tree
Showing 8 changed files with 34 additions and 14 deletions.
2 changes: 2 additions & 0 deletions .git-blame-ignore-revs
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
# Scala Steward: Reformat with scalafmt 3.8.2
ec597c4fe805f52f0b7b8607a0c12cb9aa88f460
2 changes: 1 addition & 1 deletion .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ jobs:
runs-on: ubuntu-latest
strategy:
matrix:
scala: ["2.12.18", "2.13.13", "3.3.1"]
scala: ["2.12.19", "2.13.14", "3.3.3"]
steps:
- uses: actions/checkout@v2
- uses: coursier/cache-action@v6
Expand Down
2 changes: 1 addition & 1 deletion .scalafmt.conf
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
version = 3.8.1
version = 3.8.2
runner.dialect = scala212
fileOverride {
"glob:**.sbt" {
Expand Down
8 changes: 4 additions & 4 deletions build.sbt
Original file line number Diff line number Diff line change
Expand Up @@ -19,16 +19,16 @@ inThisBuild(
)
)

scalaVersion := "2.12.18"
crossScalaVersions := Seq("2.12.18", "2.13.13", "3.3.1")
scalaVersion := "2.12.19"
crossScalaVersions := Seq("2.12.19", "2.13.14", "3.3.3")

libraryDependencies ++=
Seq(
"com.github.ben-manes.caffeine" % "caffeine" % CaffeineVersion.value,
"org.scala-lang.modules" %% "scala-java8-compat" % "1.0.2",
"com.google.code.findbugs" % "jsr305" % "3.0.2" % "provided",
"org.scalactic" %% "scalactic" % "3.2.18" % "test",
"org.scalatest" %% "scalatest" % "3.2.18" % "test"
"org.scalactic" %% "scalactic" % "3.2.19" % "test",
"org.scalatest" %% "scalatest" % "3.2.19" % "test"
)

scalafmtOnCompile := true
Expand Down
2 changes: 1 addition & 1 deletion project/build.properties
Original file line number Diff line number Diff line change
@@ -1 +1 @@
sbt.version = 1.9.9
sbt.version = 1.10.1
2 changes: 1 addition & 1 deletion project/plugins.sbt
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
addSbtPlugin("org.scoverage" % "sbt-scoverage" % "2.0.12")
addSbtPlugin("org.scoverage" % "sbt-scoverage" % "2.1.0")

addSbtPlugin("org.scoverage" % "sbt-coveralls" % "1.3.11")

Expand Down
10 changes: 8 additions & 2 deletions src/test/scala/com/github/blemale/scaffeine/AsyncCacheSpec.scala
Original file line number Diff line number Diff line change
Expand Up @@ -54,7 +54,10 @@ class AsyncCacheSpec
val values =
cache.getAll(List("foo", "bar"), _.map(key => (key, "computed")).toMap)

values.futureValue should contain only ("foo" -> "present", "bar" -> "computed")
values.futureValue should contain only (
"foo" -> "present",
"bar" -> "computed"
)
}

"get or compute async all values" in {
Expand All @@ -66,7 +69,10 @@ class AsyncCacheSpec
keys => Future.successful(keys.map(key => (key, "computed")).toMap)
)

values.futureValue should contain only ("foo" -> "present", "bar" -> "computed")
values.futureValue should contain only (
"foo" -> "present",
"bar" -> "computed"
)
}

"put value" in {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,10 @@ class AsyncLoadingCacheSpec
cache.put("foo", Future.successful("present"))
val values = cache.getAll(List("foo", "bar"))

values.futureValue should contain only ("foo" -> "present", "bar" -> "loaded")
values.futureValue should contain only (
"foo" -> "present",
"bar" -> "loaded"
)
}

"get or bulk load all given values" in {
Expand All @@ -48,7 +51,10 @@ class AsyncLoadingCacheSpec
cache.put("foo", Future.successful("present"))
val values = cache.getAll(List("foo", "bar"))

values.futureValue should contain only ("foo" -> "present", "bar" -> "bulked")
values.futureValue should contain only (
"foo" -> "present",
"bar" -> "bulked"
)
}

"expose a synchronous view of itself" in {
Expand Down Expand Up @@ -83,7 +89,10 @@ class AsyncLoadingCacheSpec
cache.put("foo", Future.successful("present"))
val values = cache.getAll(List("foo", "bar"))

values.futureValue should contain only ("foo" -> "present", "bar" -> "loaded")
values.futureValue should contain only (
"foo" -> "present",
"bar" -> "loaded"
)
}

"get or bulk load all given values" in {
Expand All @@ -97,7 +106,10 @@ class AsyncLoadingCacheSpec
cache.put("foo", Future.successful("present"))
val values = cache.getAll(List("foo", "bar"))

values.futureValue should contain only ("foo" -> "present", "bar" -> "bulked")
values.futureValue should contain only (
"foo" -> "present",
"bar" -> "bulked"
)
}
}

Expand Down

0 comments on commit c4a6656

Please sign in to comment.