]
Cheng Fang commented on WFLY-13064:
-----------------------------------
looks like the failed test {{testHttpRemotingProtocol}} has an execution dependency on the
other test. So running this test alone will always fail, and this was expected (this test
is not to be run alone).
It will pass when running the whole test case:
cd testsuite/integration/multinode
mvn clean install -Dtest=RemoteProtocolChangeClientInterceptorTestCase
EJB client-side interceptor failure when using HTTPRemoting Protocol
--------------------------------------------------------------------
Key: WFLY-13064
URL:
https://issues.redhat.com/browse/WFLY-13064
Project: WildFly
Issue Type: Bug
Components: EJB, Test Suite
Affects Versions: 19.0.0.Beta1
Reporter: Francesco Marchioni
Assignee: Cheng Fang
Priority: Major
Attachments: surefire-reports-RemoteProtocolChangeClientInterceptorTestCase.zip
The following
[
test|https://github.com/wildfly/wildfly/blob/master/testsuite/integration...]
fails in counting the EJB Client Interceptor count, when the HTTP Remoting Protocol is
used:
{code:java}
@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());
}
{code}
Stack Trace:
{code:java}
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)
{code}