puppetlabs / clj-http-client

HTTP client library wrapping Apache HttpAsyncClient
Apache License 2.0
15 stars 30 forks source link

Testsuite failure: sync-client-test-ssl-protocols (HttpAsyncRequestExecutor.java:356) should not connect to a server when protocols don't overlap clojure sync client #85

Closed baldurmen closed 1 year ago

baldurmen commented 3 years ago

Describe the Bug

The testsuite currently fails with this error:

ERROR in (sync-client-test-ssl-protocols) (HttpAsyncRequestExecutor.java:350)
should not connect to a server when protocols don't overlap clojure sync client
expected: (thrown? SSLException (clj-https-get-with-protocols ["TLSv1.2"] nil))
  actual: org.apache.http.ConnectionClosedException: Connection closed
 at org.apache.http.nio.protocol.HttpAsyncRequestExecutor.endOfInput (HttpAsyncRequestExecutor.java:350)
    org.apache.http.impl.nio.DefaultNHttpClientConnection.consumeInput (DefaultNHttpClientConnection.java:261)
    org.apache.http.impl.nio.client.InternalIODispatch.onInputReady (InternalIODispatch.java:81)
    org.apache.http.impl.nio.client.InternalIODispatch.onInputReady (InternalIODispatch.java:39)
    org.apache.http.impl.nio.reactor.AbstractIODispatch.inputReady (AbstractIODispatch.java:121)
    org.apache.http.impl.nio.reactor.BaseIOReactor.readable (BaseIOReactor.java:162)
    org.apache.http.impl.nio.reactor.AbstractIOReactor.processEvent (AbstractIOReactor.java:337)
    org.apache.http.impl.nio.reactor.AbstractIOReactor.processEvents (AbstractIOReactor.java:315)
    org.apache.http.impl.nio.reactor.AbstractIOReactor.execute (AbstractIOReactor.java:276)
    org.apache.http.impl.nio.reactor.BaseIOReactor.execute (BaseIOReactor.java:104)
    org.apache.http.impl.nio.reactor.AbstractMultiworkerIOReactor$Worker.run (AbstractMultiworkerIOReactor.java:588)
    java.lang.Thread.run (Thread.java:829)

Expected Behavior

The testsuite should not fail :)

Steps to Reproduce

Steps to reproduce the behavior:

  1. Spin a new Debian unstable VM
  2. git clone https://github.com/puppetlabs/clj-http-client
  3. git checkout 1.2.0
  4. lein test :only puppetlabs.http.client.sync-ssl-test/sync-client-test-ssl-protocols

Environment

Additional Context

I have been able to reproduce this failure:

  1. On a Debian unstable machine using libraries downloaded from Maven Central (probably what you do in your dev environment)
  2. On a Debian unstable machine in the puppetlabs-http-client-clojure Debian package (thus using Debian libraries only): https://bugs.debian.org/cgi-bin/bugreport.cgi?bug=986513

Happy to provide more info or run tests if you need me to.

baldurmen commented 1 year ago

This bug has been fixed between 1.2.0 and 2.1.0, as we can't reproduce it anymore.