Skip to content

Commit

Permalink
remove compile-time warnings (#1254)
Browse files Browse the repository at this point in the history
  • Loading branch information
davidangb authored Dec 5, 2023
1 parent e7b85a1 commit 87f8713
Show file tree
Hide file tree
Showing 8 changed files with 10 additions and 8 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,7 @@ class RegisterService(val rawlsDao: RawlsDAO, val samDao: SamDAO, val thurloeDao
_ <- thurloeDao.saveKeyValues(registrationResultUserInfo, Map("isRegistrationComplete" -> Profile.currentVersion.toString))
_ <- if (!registerResult.allowed) {
thurloeDao.saveKeyValues(registrationResultUserInfo, Map("email" -> userInfo.userEmail))
} else Future.successful()
} else Future.successful(())
} yield RequestComplete(StatusCodes.OK, registerResult)

def createUpdateProfile(userInfo: UserInfo, basicProfile: BasicProfile): Future[PerRequestMessage] = {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,7 @@ class HttpGoogleServicesDAOSpec extends AnyFlatSpec with Matchers with PrivateMe
val testProject = "broad-dsde-dev"
val priceListUrl = ConfigFactory.load().getString("googlecloud.priceListUrl")
val defaultPriceList = GooglePriceList(GooglePrices(Map("us" -> BigDecimal(-0.11)), UsTieredPriceItem(Map(1L -> BigDecimal(-0.22)))), "v1", "1")
implicit val system = ActorSystem("HttpGoogleCloudStorageDAOSpec")
implicit val system: ActorSystem = ActorSystem("HttpGoogleCloudStorageDAOSpec")
import system.dispatcher
val gcsDAO = new HttpGoogleServicesDAO(priceListUrl, defaultPriceList)

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@ import java.util.UUID

class HttpImportServiceDAOSpec extends AsyncFlatSpec with Matchers with SprayJsonSupport {

implicit val system = ActorSystem("HttpGoogleCloudStorageDAOSpec")
implicit val system: ActorSystem = ActorSystem("HttpGoogleCloudStorageDAOSpec")
import system.dispatcher

behavior of "HttpImportServiceDAO"
Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
package org.broadinstitute.dsde.firecloud.service

import akka.http.scaladsl.server.ExceptionHandler
import org.broadinstitute.dsde.firecloud.dataaccess._
import org.broadinstitute.dsde.firecloud.mock.MockGoogleServicesDAO
import org.broadinstitute.dsde.firecloud.{Application, FireCloudApiService}
Expand All @@ -8,7 +9,7 @@ import org.scalatest.BeforeAndAfter
class BaseServiceSpec extends ServiceSpec with BeforeAndAfter {

// this gets fed into sealRoute so that exceptions are handled the same in tests as in real life
implicit val exceptionHandler = FireCloudApiService.exceptionHandler
implicit val exceptionHandler: ExceptionHandler = FireCloudApiService.exceptionHandler

val agoraDao:MockAgoraDAO = new MockAgoraDAO
val googleServicesDao:MockGoogleServicesDAO = new MockGoogleServicesDAO
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@ class ExportEntitiesByTypeServiceSpec extends BaseServiceSpec with ExportEntitie
override val executionContext: ExecutionContext = scala.concurrent.ExecutionContext.Implicits.global

// On travis, slow processing causes the route to timeout and complete too quickly for the large content checks.
override implicit val routeTestTimeout = RouteTestTimeout(30.seconds)
override implicit val routeTestTimeout: RouteTestTimeout = RouteTestTimeout(30.seconds)

def actorRefFactory: ActorSystem = system

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,7 @@ import akka.http.scaladsl.model.StatusCodes.OK
import akka.http.scaladsl.model.Uri
import akka.http.scaladsl.model.Uri.{Path, Query}
import spray.json.DefaultJsonProtocol._
import spray.json.RootJsonFormat

import scala.jdk.CollectionConverters._

Expand Down Expand Up @@ -45,5 +46,5 @@ case class RequestInfo(
url: String)

object PassthroughDirectivesSpecSupport {
implicit val requestInfoFormat = jsonFormat4(RequestInfo)
implicit val requestInfoFormat: RootJsonFormat[RequestInfo] = jsonFormat4(RequestInfo)
}
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@ import scala.concurrent.duration._
// common Service Spec to be inherited by service tests
trait ServiceSpec extends AnyFreeSpec with ScalaFutures with ScalatestRouteTest with Matchers with TestRequestBuilding with TestKitBase {

implicit val routeTestTimeout = RouteTestTimeout(5.seconds)
implicit val routeTestTimeout: RouteTestTimeout = RouteTestTimeout(5.seconds)

val allHttpMethods = Seq(CONNECT, DELETE, GET, HEAD, PATCH, POST, PUT, TRACE)

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@ import scala.concurrent.duration._
trait ApiServiceSpec extends AnyFlatSpec with Matchers with ScalatestRouteTest with SprayJsonSupport with TestRequestBuilding {
// increase the timeout for ScalatestRouteTest from the default of 1 second, otherwise
// intermittent failures occur on requests not completing in time
implicit val routeTestTimeout = RouteTestTimeout(5.seconds)
implicit val routeTestTimeout: RouteTestTimeout = RouteTestTimeout(5.seconds)

def actorRefFactory = system

Expand Down

0 comments on commit 87f8713

Please sign in to comment.