debug level logs:

INFO - akka.event.slf4j.Slf4jLogger - Slf4jLogger started
DEBUG - akka.event.EventStream - logger log1-Slf4jLogger started
DEBUG - akka.event.EventStream - Default Loggers started
DEBUG - com.typesafe.sslconfig.akka.AkkaSSLConfig - Initializing 
AkkaSSLConfig extension...
DEBUG - com.typesafe.sslconfig.akka.AkkaSSLConfig - buildHostnameVerifier: 
created hostname verifier: 
com.typesafe.sslconfig.ssl.DefaultHostnameVerifier@39a2fc30
DEBUG - akka.io.TcpListener - Successfully bound to /127.0.0.1:57407
DEBUG - akka.http.impl.engine.client.PoolInterfaceActor - (Re-)starting 
host connection pool to localhost:57407
DEBUG - akka.http.impl.engine.client.PoolSlot$SlotProcessor - become 
unconnected, from subscriber pending
DEBUG - akka.http.impl.engine.client.PoolSlot$SlotProcessor - become 
unconnected, from subscriber pending
DEBUG - akka.http.impl.engine.client.PoolSlot$SlotProcessor - become 
unconnected, from subscriber pending
DEBUG - akka.http.impl.engine.client.PoolSlot$SlotProcessor - become 
unconnected, from subscriber pending
DEBUG - akka.io.TcpOutgoingConnection - Attempting connection to 
[localhost/127.0.0.1:57407]
DEBUG - akka.io.TcpListener - New connection accepted
DEBUG - akka.io.TcpOutgoingConnection - Connection established to 
[localhost/127.0.0.1:57407]
INFO - akka.actor.LocalActorRef - Message [akka.io.Tcp$ResumeReading$] from 
Actor[akka://ProxyActorTest/user/StreamSupervisor-1/$$b#-1567866888] to 
Actor[akka://ProxyActorTest/system/IO-TCP/selectors/$a/1#1829940929] was 
not delivered. [1] dead letters encountered. This logging can be turned off 
or adjusted with configuration settings 'akka.log-dead-letters' and 
'akka.log-dead-letters-during-shutdown'.
DEBUG - akka.http.impl.engine.client.PoolSlot$SlotProcessor - Slot 0 
disconnected after regular connection close
response returned

Futures timed out after [10 seconds]
java.util.concurrent.TimeoutException: Futures timed out after [10 seconds]
at scala.concurrent.impl.Promise$DefaultPromise.ready(Promise.scala:219)
at scala.concurrent.impl.Promise$DefaultPromise.result(Promise.scala:223)
at scala.concurrent.Await$$anonfun$result$1.apply(package.scala:190)
at 
scala.concurrent.BlockContext$DefaultBlockContext$.blockOn(BlockContext.scala:53)
at scala.concurrent.Await$.result(package.scala:190)
at 
com.oneapm.mordor.actors.marathon.ProxyActorTest$$anonfun$1$$anonfun$apply$mcV$sp$3.apply$mcV$sp(ProxyActorTest.scala:160)
at 
com.oneapm.mordor.actors.marathon.ProxyActorTest$$anonfun$1$$anonfun$apply$mcV$sp$3.apply(ProxyActorTest.scala:122)
at 
com.oneapm.mordor.actors.marathon.ProxyActorTest$$anonfun$1$$anonfun$apply$mcV$sp$3.apply(ProxyActorTest.scala:122)


On Tuesday, April 5, 2016 at 3:44:37 PM UTC+8, √ wrote:
>
> Could you include the error?
>
> -- 
> Cheers,
> √
> On Apr 5, 2016 08:37, "xiaog zh" <[email protected] <javascript:>> wrote:
>
>> Hi,
>>   Below is a whole unit test in my project, and it fails when using 
>> `HTTP/1.0` protocol, success when using `HTTP/1.1`. Can somebody help 
>> explain the reason?
>>
>> // setup mock server
>> val json =
>>   """
>>     |{"result":true}
>>   """.stripMargin
>>
>> val source = Source(ByteString(json) :: Nil)
>> val mockRoutes = path("test" / "proxy_chunked.do") {
>>   get {
>>     complete {
>>       HttpResponse(StatusCodes.OK, entity = 
>> HttpEntity(ContentTypes.`application/json`, source))
>>     }
>>   }
>> } ~ complete {
>>   HttpResponse(StatusCodes.NotFound)
>> }
>>
>> val (_, host, port) = AkkaHttpTestUtils.temporaryServerHostnameAndPort()
>> val bindingFuture = Http().bindAndHandle(mockRoutes, host, port)
>>
>> val request = HttpRequest(
>>   HttpMethods.GET,
>>   uri = s"http://${host}:${port}/test/proxy_chunked.do";,
>>   protocol = HttpProtocols.`HTTP/1.0`
>> )
>>
>> val futureByteString = Http().singleRequest(request).map { resp =>
>>   println("response returned")
>>   resp.entity.dataBytes
>> } flatMap { source =>
>>   source.runFold(ByteString.empty)((r, bs) => r ++ bs)
>> }
>> val byteString = Await.result(futureByteString, 10 seconds)
>> byteString.utf8String shouldEqual (json)
>>
>>
>>
>> -- 
>> >>>>>>>>>> Read the docs: http://akka.io/docs/
>> >>>>>>>>>> Check the FAQ: 
>> http://doc.akka.io/docs/akka/current/additional/faq.html
>> >>>>>>>>>> Search the archives: https://groups.google.com/group/akka-user
>> --- 
>> You received this message because you are subscribed to the Google Groups 
>> "Akka User List" group.
>> To unsubscribe from this group and stop receiving emails from it, send an 
>> email to [email protected] <javascript:>.
>> To post to this group, send email to [email protected] 
>> <javascript:>.
>> Visit this group at https://groups.google.com/group/akka-user.
>> For more options, visit https://groups.google.com/d/optout.
>>
>

-- 
>>>>>>>>>>      Read the docs: http://akka.io/docs/
>>>>>>>>>>      Check the FAQ: 
>>>>>>>>>> http://doc.akka.io/docs/akka/current/additional/faq.html
>>>>>>>>>>      Search the archives: https://groups.google.com/group/akka-user
--- 
You received this message because you are subscribed to the Google Groups "Akka 
User List" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to [email protected].
To post to this group, send email to [email protected].
Visit this group at https://groups.google.com/group/akka-user.
For more options, visit https://groups.google.com/d/optout.

Reply via email to