You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@drill.apache.org by "Vitalii Diravka (Jira)" <ji...@apache.org> on 2022/05/12 14:36:00 UTC

[jira] [Updated] (DRILL-8224) Fix TestHttpPlugin#testSlowResponse

     [ https://issues.apache.org/jira/browse/DRILL-8224?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Vitalii Diravka updated DRILL-8224:
-----------------------------------
    Description: 
In [DRILL-7973|https://github.com/apache/drill/commit/304230a289505526e1ff1bb1aae932517b7b6965#diff-c6b42ccd4a5372e7c299b3b8052455c0fe618403a957e0b1b908edf46eee4809R880] timeout for http request in mock http plugin was changed.
But looks like we need to use other method, not {{_throttleBody:_}}
 * Throttles the request reader and response writer to sleep for the given period after each
 * series of [bytesPerPeriod] bytes are transferred. Use this to simulate network behavior.

That means we can sleep longer than 6 seconds, but 10s configured in plugin. Possibly {{_new MockResponse().setBodyDelay(20, TimeUnit.DAYS).setHeadersDelay(20, TimeUnit.DAYS);_}} should work:
https://github.com/square/okhttp/issues/6976#issuecomment-1006028317

Also current MockWebServer 4.9.2 version can be updated to  4.9.3:
https://mvnrepository.com/artifact/com.squareup.okhttp3/mockwebserver/4.9.3

  was:
In [DRILL-7973|https://github.com/apache/drill/commit/304230a289505526e1ff1bb1aae932517b7b6965#diff-c6b42ccd4a5372e7c299b3b8052455c0fe618403a957e0b1b908edf46eee4809R880] timeout for http request in mock http plugin was changed.
But looks like we need to use other method, not {{_throttleBody:_}}
   * Throttles the request reader and response writer to sleep for the given period after each
   * series of [bytesPerPeriod] bytes are transferred. Use this to simulate network behavior.
That means we can sleep longer than 6 seconds, but 10s configured in plugin. Possibly{{ _new MockResponse().setBodyDelay(20, TimeUnit.DAYS).setHeadersDelay(20, TimeUnit.DAYS);_ should work:}}
{{_[https://github.com/square/okhttp/issues/6976#issuecomment-1006028317
]_}}
{{{_}{_}Also I would recommend to update current MockWebServer 4.9.2 version to  4.9.3}}


> Fix TestHttpPlugin#testSlowResponse
> -----------------------------------
>
>                 Key: DRILL-8224
>                 URL: https://issues.apache.org/jira/browse/DRILL-8224
>             Project: Apache Drill
>          Issue Type: Sub-task
>            Reporter: Vitalii Diravka
>            Assignee: Vitalii Diravka
>            Priority: Major
>
> In [DRILL-7973|https://github.com/apache/drill/commit/304230a289505526e1ff1bb1aae932517b7b6965#diff-c6b42ccd4a5372e7c299b3b8052455c0fe618403a957e0b1b908edf46eee4809R880] timeout for http request in mock http plugin was changed.
> But looks like we need to use other method, not {{_throttleBody:_}}
>  * Throttles the request reader and response writer to sleep for the given period after each
>  * series of [bytesPerPeriod] bytes are transferred. Use this to simulate network behavior.
> That means we can sleep longer than 6 seconds, but 10s configured in plugin. Possibly {{_new MockResponse().setBodyDelay(20, TimeUnit.DAYS).setHeadersDelay(20, TimeUnit.DAYS);_}} should work:
> https://github.com/square/okhttp/issues/6976#issuecomment-1006028317
> Also current MockWebServer 4.9.2 version can be updated to  4.9.3:
> https://mvnrepository.com/artifact/com.squareup.okhttp3/mockwebserver/4.9.3



--
This message was sent by Atlassian Jira
(v8.20.7#820007)