Details
-
Sub-task
-
Status: Closed
-
Major
-
Resolution: Fixed
-
1.20.1
-
None
-
None
Description
In DRILL-7973 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