Skip to content

Commit

Permalink
Merge pull request #416 from mkurz/drop_scalacompat8
Browse files Browse the repository at this point in the history
Drop scala compat, no need anymore
  • Loading branch information
mkurz authored Oct 19, 2023
2 parents 8f34628 + 4fc8ec9 commit 4e01f16
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 6 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ import play.api.test._
import play.shaded.ahc.org.asynchttpclient.AsyncHttpClient
import play.shaded.ahc.org.asynchttpclient.ws.WebSocket

import scala.compat.java8.FutureConverters
import scala.jdk.javaapi.FutureConverters
import scala.concurrent.Await
import scala.concurrent.duration._
import scala.language.postfixOps
Expand All @@ -35,7 +35,7 @@ class HomeControllerSpec extends PlaySpec with ScalaFutures with IntegrationPati
val origin = "ws://example.com/ws/chat"
val listener = new WebSocketClient.LoggingListener
val completionStage = webSocketClient.call(serverURL, origin, listener)
val f = FutureConverters.toScala(completionStage)
val f = FutureConverters.asScala(completionStage)
Await.result(f, atMost = 1000 millis)
listener.getThrowable mustBe a[IOException]
} catch {
Expand Down Expand Up @@ -63,7 +63,7 @@ class HomeControllerSpec extends PlaySpec with ScalaFutures with IntegrationPati
val origin = serverURL
val listener = new WebSocketClient.LoggingListener
val completionStage = webSocketClient.call(serverURL, origin, listener)
val f = FutureConverters.toScala(completionStage)
val f = FutureConverters.asScala(completionStage)

whenReady(f, timeout = Timeout(1 second)) { webSocket =>
webSocket mustBe a [WebSocket]
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ import play.api.test.{Helpers, TestServer, WsTestClient}
import org.awaitility.Awaitility._
import play.api.libs.json._

import scala.compat.java8.FutureConverters
import scala.jdk.javaapi.FutureConverters
import scala.concurrent.Await
import scala.concurrent.duration._

Expand All @@ -39,7 +39,7 @@ class FunctionalSpec extends PlaySpec with ScalaFutures {
}
val listener = new WebSocketClient.LoggingListener(consumer)
val completionStage = webSocketClient.call(serverURL, origin, listener)
val f = FutureConverters.toScala(completionStage)
val f = FutureConverters.asScala(completionStage)
Await.result(f, atMost = 1000.millis)
listener.getThrowable.printStackTrace()
listener.getThrowable mustBe a[IOException]
Expand Down Expand Up @@ -70,7 +70,7 @@ class FunctionalSpec extends PlaySpec with ScalaFutures {
}
val listener = new WebSocketClient.LoggingListener(consumer)
val completionStage = webSocketClient.call(serverURL, origin, listener)
val f = FutureConverters.toScala(completionStage)
val f = FutureConverters.asScala(completionStage)

// Test we can get good output from the websocket
whenReady(f, timeout = Timeout(1.second)) { webSocket =>
Expand Down

0 comments on commit 4e01f16

Please sign in to comment.