Philippus/elastic4s

Can we set a timeOut as part of the EsClient Setting?

Closed this issue · 3 comments

I keep getting this error in my tests.
Can we create a way to set timeout when building the ESClient?

Screenshot 2024-09-17 at 18 28 37
  private object CustomRequestConfigCallback extends RequestConfigCallback {
    override def customizeRequestConfig(requestConfigBuilder: RequestConfig.Builder): RequestConfig.Builder =
      requestConfigBuilder
        .setConnectionRequestTimeout(20000) // Increased timeout
        .setConnectTimeout(20000) // Increased timeout
        .setSocketTimeout(20000) // Increased timeout
  }

I think this answers my question but I still get the error when I run my IT tests

@Philippus @vbehar @rauanmayemir closing this issue but just incase you have an answers feel free to let me know thanks.

If you have a repo with a minimal reproducer we could take a look.