From ce4e208d85b1e78db99fcf81e1a51220e321479c Mon Sep 17 00:00:00 2001 From: gosubpl Date: Sun, 28 Aug 2016 00:23:40 +0200 Subject: [PATCH] filtering out timeout-access header in additional tests (#20817) --- .../impl/engine/server/HttpServerSpec.scala | 18 +++++++++--------- .../akka/http/scaladsl/ClientServerSpec.scala | 2 +- 2 files changed, 10 insertions(+), 10 deletions(-) diff --git a/akka-http-core/src/test/scala/akka/http/impl/engine/server/HttpServerSpec.scala b/akka-http-core/src/test/scala/akka/http/impl/engine/server/HttpServerSpec.scala index d367860500..17c4ffdc20 100644 --- a/akka-http-core/src/test/scala/akka/http/impl/engine/server/HttpServerSpec.scala +++ b/akka-http-core/src/test/scala/akka/http/impl/engine/server/HttpServerSpec.scala @@ -40,7 +40,7 @@ class HttpServerSpec extends AkkaSpec( | |""") - expectRequest() mapHeaders(_.filterNot(_.is("timeout-access"))) shouldEqual HttpRequest(uri = "http://example.com/", headers = List(Host("example.com"))) + expectRequest() mapHeaders (_.filterNot(_.is("timeout-access"))) shouldEqual HttpRequest(uri = "http://example.com/", headers = List(Host("example.com"))) shutdownBlueprint() }) @@ -141,7 +141,7 @@ class HttpServerSpec extends AkkaSpec( | |abcdefghijkl""") - expectRequest() mapHeaders(_.filterNot(_.is("timeout-access"))) shouldEqual + expectRequest() mapHeaders (_.filterNot(_.is("timeout-access"))) shouldEqual HttpRequest( method = POST, uri = "http://example.com/strict", @@ -205,7 +205,7 @@ class HttpServerSpec extends AkkaSpec( | |abcdefghijkl""") - expectRequest() mapHeaders(_.filterNot(_.is("timeout-access"))) shouldEqual + expectRequest() mapHeaders (_.filterNot(_.is("timeout-access"))) shouldEqual HttpRequest( method = POST, uri = "http://example.com/strict", @@ -218,7 +218,7 @@ class HttpServerSpec extends AkkaSpec( | |mnopqrstuvwx""") - expectRequest() mapHeaders(_.filterNot(_.is("timeout-access"))) shouldEqual + expectRequest() mapHeaders (_.filterNot(_.is("timeout-access"))) shouldEqual HttpRequest( method = POST, uri = "http://example.com/next-strict", @@ -446,7 +446,7 @@ class HttpServerSpec extends AkkaSpec( |Host: example.com | |""") - expectRequest() mapHeaders(_.filterNot(_.is("timeout-access"))) shouldEqual HttpRequest(GET, uri = "http://example.com/", headers = List(Host("example.com"))) + expectRequest() mapHeaders (_.filterNot(_.is("timeout-access"))) shouldEqual HttpRequest(GET, uri = "http://example.com/", headers = List(Host("example.com"))) shutdownBlueprint() }) @@ -456,7 +456,7 @@ class HttpServerSpec extends AkkaSpec( |Host: example.com | |""") - expectRequest() mapHeaders(_.filterNot(_.is("timeout-access"))) shouldEqual HttpRequest(HEAD, uri = "http://example.com/", headers = List(Host("example.com"))) + expectRequest() mapHeaders (_.filterNot(_.is("timeout-access"))) shouldEqual HttpRequest(HEAD, uri = "http://example.com/", headers = List(Host("example.com"))) shutdownBlueprint() }) @@ -696,7 +696,7 @@ class HttpServerSpec extends AkkaSpec( | |""".stripMarginWithNewline("\r\n")) - expectRequest() mapHeaders(_.filterNot(_.is("timeout-access"))) shouldEqual HttpRequest(uri = "http://example.com/", headers = List(Host("example.com"))) + expectRequest() mapHeaders (_.filterNot(_.is("timeout-access"))) shouldEqual HttpRequest(uri = "http://example.com/", headers = List(Host("example.com"))) responses.expectRequest() responses.sendError(new RuntimeException("CRASH BOOM BANG")) @@ -758,7 +758,7 @@ class HttpServerSpec extends AkkaSpec( | |""") - expectRequest() mapHeaders(_.filterNot(_.is("timeout-access"))) shouldEqual HttpRequest(uri = "http://example.com//foo", headers = List(Host("example.com"))) + expectRequest() mapHeaders (_.filterNot(_.is("timeout-access"))) shouldEqual HttpRequest(uri = "http://example.com//foo", headers = List(Host("example.com"))) shutdownBlueprint() }) @@ -767,7 +767,7 @@ class HttpServerSpec extends AkkaSpec( | |""") - expectRequest() mapHeaders(_.filterNot(_.is("timeout-access"))) shouldEqual HttpRequest(uri = "http://example.com/abc", protocol = HttpProtocols.`HTTP/1.0`) + expectRequest() mapHeaders (_.filterNot(_.is("timeout-access"))) shouldEqual HttpRequest(uri = "http://example.com/abc", protocol = HttpProtocols.`HTTP/1.0`) override def settings: ServerSettings = super.settings.withDefaultHostHeader(Host("example.com")) diff --git a/akka-http-core/src/test/scala/akka/http/scaladsl/ClientServerSpec.scala b/akka-http-core/src/test/scala/akka/http/scaladsl/ClientServerSpec.scala index 264c3fbae0..60869305d6 100644 --- a/akka-http-core/src/test/scala/akka/http/scaladsl/ClientServerSpec.scala +++ b/akka-http-core/src/test/scala/akka/http/scaladsl/ClientServerSpec.scala @@ -447,7 +447,7 @@ class ClientServerSpec extends WordSpec with Matchers with BeforeAndAfterAll wit val serverInSub = serverIn.expectSubscription() serverInSub.request(1) private val HttpRequest(POST, uri, List(Accept(Seq(MediaRanges.`*/*`)), Host(_, _), `User-Agent`(_)), - Chunked(`chunkedContentType`, chunkStream), HttpProtocols.`HTTP/1.1`) = serverIn.expectNext() + Chunked(`chunkedContentType`, chunkStream), HttpProtocols.`HTTP/1.1`) = serverIn.expectNext() mapHeaders (_.filterNot(_.is("timeout-access"))) uri shouldEqual Uri(s"http://$hostname:$port/chunked") Await.result(chunkStream.limit(5).runWith(Sink.seq), 100.millis) shouldEqual chunks