Uploaded image for project: 'WildFly'
  1. WildFly
  2. WFLY-13064

EJB client-side interceptor failure when using HTTPRemoting Protocol

    XMLWordPrintable

Details

    • Bug
    • Resolution: Won't Do
    • Major
    • None
    • 19.0.0.Beta1
    • EJB, Test Suite
    • None
    • Hide
      $ cd testsuite/integration/multinode
      $ mvn clean install -Dtest=*RemoteProtocolChangeClientInterceptorTestCase#testHttpRemotingProtocol  -Djboss.dist=$JBOSS_HOME  
      
      
      Show
      $ cd testsuite/integration/multinode $ mvn clean install -Dtest=*RemoteProtocolChangeClientInterceptorTestCase#testHttpRemotingProtocol -Djboss.dist=$JBOSS_HOME

    Description

      The following test fails in counting the EJB Client Interceptor count, when the HTTP Remoting Protocol is used:

          @Test
          @InSequence(2)
          @OperateOnDeployment("client")
          public void testHttpRemotingProtocol() throws Exception {
              final Hashtable<String, String> props = new Hashtable<>();
              props.put(Context.URL_PKG_PREFIXES, "org.jboss.ejb.client.naming");
              props.put(Context.INITIAL_CONTEXT_FACTORY, "org.jboss.naming.remote.client.InitialContextFactory");
              props.put(Context.PROVIDER_URL, "http-remoting://" + TestSuiteEnvironment.getServerAddress() + ":"
                      + (TestSuiteEnvironment.getHttpPort() + Integer.parseInt(getSystemProperty("jboss.socket.binding.port-offset", "100"))));
      
              StatelessRemote bean = getRemote(new InitialContext(props));
              Assert.assertNotNull(bean);
      
              // StatelessBean.methodCount field should equal 2 after second invoking (methodCount is a static field and is shared within a single JVM)
              Assert.assertEquals(ProtocolSampleClientInterceptor.COUNT + 2, bean.method());
          }
      

      Stack Trace:

      14:46:01 [ERROR] testHttpRemotingProtocol(org.jboss.as.test.multinode.clientinterceptor.protocol.RemoteProtocolChangeClientInterceptorTestCase)  Time elapsed: 0.77 s  <<< FAILURE!
      14:46:01 java.lang.AssertionError: expected:<12> but was:<11>
      14:46:01 	at org.junit.Assert.fail(Assert.java:88)
      14:46:01 	at org.junit.Assert.failNotEquals(Assert.java:834)
      14:46:01 	at org.junit.Assert.assertEquals(Assert.java:645)
      14:46:01 	at org.junit.Assert.assertEquals(Assert.java:631)
      14:46:01 	at org.jboss.as.test.multinode.clientinterceptor.protocol.RemoteProtocolChangeClientInterceptorTestCase.testHttpRemotingProtocol(RemoteProtocolChangeClientInterceptorTestCase.java:130)
      

      Attachments

        Issue Links

          Activity

            People

              cfang@redhat.com Cheng Fang
              fmarchio@redhat.com Francesco Marchioni (Inactive)
              Votes:
              0 Vote for this issue
              Watchers:
              2 Start watching this issue

              Dates

                Created:
                Updated:
                Resolved: