Uploaded image for project: 'Red Hat Build of Apache Camel for Quarkus'
  1. Red Hat Build of Apache Camel for Quarkus
  2. CEQ-7601

CXF SAML Security unit test hangs if the client is configured incorrectly.

XMLWordPrintable

    • False
    • Hide

      None

      Show
      None
    • False
    • 0

      A Camel CXF SAML security project is configured to serve on a TLS enabled port, if a unit test calls the CXF endpoint incorrectly, the test case hangs incorrectly and throws this thread dump:

      @QuarkusTest has detected a hang, as there has been no test activity in PT30S
      To configure this timeout use the quarkus.test.hang-detection-timeout config property
      A stack trace is below to help diagnose the potential hang
      === Stack Trace ===
      Thread main: TIMED_WAITING
        Stack:
          java.base@17.0.8/java.lang.Object.wait(Native Method)
          java.base@17.0.8/java.io.PipedInputStream.awaitSpace(PipedInputStream.java:273)
          java.base@17.0.8/java.io.PipedInputStream.receive(PipedInputStream.java:231)
          java.base@17.0.8/java.io.PipedOutputStream.write(PipedOutputStream.java:150)
          org.apache.cxf.io.AbstractWrappedOutputStream.write(AbstractWrappedOutputStream.java:51)
          org.apache.cxf.io.AbstractThresholdOutputStream.write(AbstractThresholdOutputStream.java:69)
          org.apache.cxf.io.CacheAndWriteOutputStream.write(CacheAndWriteOutputStream.java:81)
          org.apache.cxf.io.AbstractWrappedOutputStream.write(AbstractWrappedOutputStream.java:51)
          com.ctc.wstx.io.UTF8Writer.flush(UTF8Writer.java:100)
          com.ctc.wstx.sw.BufferingXmlWriter.flush(BufferingXmlWriter.java:242)
          com.ctc.wstx.sw.BaseStreamWriter.flush(BaseStreamWriter.java:260)
          org.apache.cxf.binding.soap.saaj.SAAJOutInterceptor$SAAJOutEndingInterceptor.handleMessage(SAAJOutInterceptor.java:214)
          org.apache.cxf.binding.soap.saaj.SAAJOutInterceptor$SAAJOutEndingInterceptor.handleMessage(SAAJOutInterceptor.java:173)
          org.apache.cxf.phase.PhaseInterceptorChain.doIntercept(PhaseInterceptorChain.java:307)
          org.apache.cxf.endpoint.ClientImpl.doInvoke(ClientImpl.java:528)
          org.apache.cxf.endpoint.ClientImpl.invoke(ClientImpl.java:439)
          org.apache.cxf.endpoint.ClientImpl.invoke(ClientImpl.java:354)
          org.apache.cxf.endpoint.ClientImpl.invoke(ClientImpl.java:312)
          org.apache.cxf.frontend.ClientProxy.invokeSync(ClientProxy.java:96)
          org.apache.cxf.jaxws.JaxWsClientProxy.invoke(JaxWsClientProxy.java:140)
          jdk.proxy6/jdk.proxy6.$Proxy187.getContact(Unknown Source)
          package.name.CxfClientSyncTest.testGetContact(CxfClientSyncTest.java:219)
          java.base@17.0.8/jdk.internal.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
      
      

      What is the incorrect configuration:

      • Not using any truststore in the JUnit client: Doing so should give an error but the test case hangs.
      • Using the incorrect endpoint URL: Doing so should throw the connection refused/timeout error but this also hangs the test case.

      I'm not able to reproduce this issue with vanilla CXF.

      I'm attaching a reproducer. To reproduce the issue:

      mvn test

      The issue is only reproducible on tls enabled CXF servers.

          There are no Sub-Tasks for this issue.

              jondruse@redhat.com Jiri Ondrusek
              rhn-support-adongre Avinash Dongre
              Lukas Lowinger Lukas Lowinger
              Votes:
              1 Vote for this issue
              Watchers:
              10 Start watching this issue

                Created:
                Updated:
                Resolved: