From d2a1090350c0dbc1135f493800ca474006c70daf Mon Sep 17 00:00:00 2001 From: paulpdaniels Date: Sun, 4 Feb 2024 20:07:06 +0800 Subject: [PATCH] use correct random implementation --- .../src/test/scala/dappermongo/CollectionProvider.scala | 6 ++++-- project/plugins.sbt | 2 -- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/modules/core/src/test/scala/dappermongo/CollectionProvider.scala b/modules/core/src/test/scala/dappermongo/CollectionProvider.scala index 559f2be..d6dbcd8 100644 --- a/modules/core/src/test/scala/dappermongo/CollectionProvider.scala +++ b/modules/core/src/test/scala/dappermongo/CollectionProvider.scala @@ -9,9 +9,11 @@ trait CollectionProvider { } object CollectionProvider { - val live: ULayer[CollectionProvider] = ZLayer.succeed(new CollectionProvider { + val live: ULayer[CollectionProvider] = ZLayer(for { + random <- ZIO.random + } yield new CollectionProvider { override def collection(name: String): ZIO[Any, Throwable, Collection] = - Random + random .nextIntBetween(1, Int.MaxValue) .map(suffix => Collection(s"${name}_$suffix")) }) diff --git a/project/plugins.sbt b/project/plugins.sbt index 6f918f2..d56feca 100644 --- a/project/plugins.sbt +++ b/project/plugins.sbt @@ -1,4 +1,2 @@ addSbtPlugin("dev.zio" % "zio-sbt-ecosystem" % "0.4.0-alpha.22") -addSbtPlugin("dev.zio" % "zio-sbt-ci" % "0.4.0-alpha.22") -addSbtPlugin("dev.zio" % "zio-sbt-website" % "0.4.0-alpha.22") addSbtPlugin("com.github.sbt" % "sbt-ci-release" % "1.5.12")