From 4494c5ac251d502567278dee19f82aed565e5cfb Mon Sep 17 00:00:00 2001 From: robert-hawkes Date: Fri, 11 May 2018 09:36:25 +0100 Subject: [PATCH] SAR-2047 - Update mongo dependency to fix exceptions --- app/repositories/LockoutMongoRepository.scala | 2 +- it/controllers/matching/LockoutStatusControllerISpec.scala | 3 ++- it/repositories/LockoutMongoRepositorySpec.scala | 2 +- project/MicroServiceBuild.scala | 4 ++-- project/build.properties | 2 +- 5 files changed, 7 insertions(+), 6 deletions(-) diff --git a/app/repositories/LockoutMongoRepository.scala b/app/repositories/LockoutMongoRepository.scala index a87200c0..9a57a546 100644 --- a/app/repositories/LockoutMongoRepository.scala +++ b/app/repositories/LockoutMongoRepository.scala @@ -73,7 +73,7 @@ class LockoutMongoRepository @Inject()(implicit mongo: ReactiveMongoComponent) setIndex() def dropDb: Future[Unit] = { - collection.drop() + collection.drop(failIfNotFound = false) setIndex().map(_ => Unit) } diff --git a/it/controllers/matching/LockoutStatusControllerISpec.scala b/it/controllers/matching/LockoutStatusControllerISpec.scala index d41f2a30..af3a425a 100644 --- a/it/controllers/matching/LockoutStatusControllerISpec.scala +++ b/it/controllers/matching/LockoutStatusControllerISpec.scala @@ -24,6 +24,7 @@ import org.scalatest.BeforeAndAfterEach import play.api.http.Status._ import play.modules.reactivemongo.ReactiveMongoComponent import repositories.LockoutMongoRepository +import scala.concurrent.ExecutionContext.Implicits.global class LockoutStatusControllerISpec extends ComponentSpecBase with BeforeAndAfterEach { implicit lazy val mongo = app.injector.instanceOf[ReactiveMongoComponent] @@ -31,7 +32,7 @@ class LockoutStatusControllerISpec extends ComponentSpecBase with BeforeAndAfter object TestLockoutMongoRepository extends LockoutMongoRepository override def beforeEach(): Unit = { - await(TestLockoutMongoRepository.dropDb) + await(TestLockoutMongoRepository.drop) } "checkLockoutStatus" should { diff --git a/it/repositories/LockoutMongoRepositorySpec.scala b/it/repositories/LockoutMongoRepositorySpec.scala index 7d5dd2f9..00cb4887 100644 --- a/it/repositories/LockoutMongoRepositorySpec.scala +++ b/it/repositories/LockoutMongoRepositorySpec.scala @@ -31,7 +31,7 @@ class LockoutMongoRepositorySpec extends UnitSpec with GuiceOneAppPerSuite with object TestLockoutMongoRepository extends LockoutMongoRepository override def beforeEach(): Unit = { - await(TestLockoutMongoRepository.dropDb) + await(TestLockoutMongoRepository.drop) } "lockoutAgent" should { diff --git a/project/MicroServiceBuild.scala b/project/MicroServiceBuild.scala index bfceed8c..70fbc41b 100644 --- a/project/MicroServiceBuild.scala +++ b/project/MicroServiceBuild.scala @@ -37,11 +37,11 @@ private object AppDependencies { private val scalaJVersion = "2.3.0" private val cucumberVersion = "1.2.5" - private val reactiveMongoVersion = "6.1.0" + private val reactiveMongoVersion = "7.0.0" private val wiremockVersion = "2.5.1" - private val bootstrapVersion = "1.4.0" + private val bootstrapVersion = "1.5.0" val compile = Seq( diff --git a/project/build.properties b/project/build.properties index 64317fda..133a8f19 100644 --- a/project/build.properties +++ b/project/build.properties @@ -1 +1 @@ -sbt.version=0.13.15 +sbt.version=0.13.17