Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 0 additions & 2 deletions project/Dependencies.scala
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,6 @@ object Dependencies {
val fontAwesomeVersion = "5.10.1"

val scalatestVersion = "3.2.20"
val mockitoScalaVersion = "2.1.0"
val scalaJsSecureRandomVersion = "1.0.0" // Tests only
val bootstrap4Version = "4.1.3"
val bootstrap4DatepickerVersion = "5.39.0"
Expand Down Expand Up @@ -100,7 +99,6 @@ object Dependencies {
"com.typesafe.scala-logging" %% "scala-logging" % scalaLoggingVersion,
"org.eclipse.jetty" % "jetty-server" % jettyVersion % Test,
"org.eclipse.jetty.ee8" % "jetty-ee8-servlet" % jettyVersion % Test,
"org.mockito" %% "mockito-scala-scalatest" % mockitoScalaVersion % Test,
))

val restSjsDeps = restCrossDeps
Expand Down
352 changes: 0 additions & 352 deletions rest/.jvm/src/test/scala/io/udash/rest/RestServletTest.scala

This file was deleted.

17 changes: 17 additions & 0 deletions rest/src/test/scala/io/udash/rest/RestApiTest.scala
Original file line number Diff line number Diff line change
Expand Up @@ -238,4 +238,21 @@ trait StreamingRestApiTestScenarios extends RestApiTest {
fail("Expected UnsupportedOperationException but operation succeeded")
}
}

"mid-stream server error propagates to client" in {
streamingProxy
.errorStream(immediate = false)
.toListL
.timeout(5.seconds)
.materialize
.runToFuture
.map {
case Failure(_: TimeoutException) =>
fail("Server did not terminate the response on mid-stream error (client hung waiting for data)")
case Failure(_) =>
succeed
case Success(list) =>
fail(s"Expected failure from mid-stream error, but stream completed successfully with: $list")
}
}
}
Loading