Closed b95505017 closed 7 years ago
It looks this PR made running tests about 4x slower. Do you know why ?
https://github.com/socketio/engine.io-client-java/pull/85/files#diff-e59436b8700f3e846c198934e8de44cdR20 Because OkHttp will not shutdown right after test execution done.
The threads and connections that are held will be released automatically if they remain idle. http://square.github.io/okhttp/3.x/okhttp/okhttp3/OkHttpClient.html
I just increase the timeout waiting time currently.
@b95505017 👍 Makes sense. We can improve it later.
I just realized these options make the library really flexible. It's amazing 😄
http://square.github.io/okhttp/3.x/okhttp/okhttp3/OkHttpClient.html
81
Now the library could inject the implementation of Call.Factory/WebSocket.Factory, usually they are the singleton of OkHttpClient instance. You could have your own factory implementation, which means that doesn't have to be
OkHttpClient
! Such as a mock implementation. Attributes in Options such ashostnameVerifier
,proxy
,SSLContext
,proxyLogin
proxyPassword
please set directly into OkHttpClient, and there are more attributes you could setup in OkHttpClient, please take a look.