[Design of JCA on JBoss] - ForceClear tests are stupid
by adrian@jboss.org
I've fixed the following test
org.jboss.test.mdbsessionpoolclear.test.MDBUnitTestCase
so it at least runs to completion.
But this test isn't actually testing anything.
The ForceClear was described as "experimental" by the person that wrote it.
Except that it broke the normal behaviour
http://jira.jboss.com/jira/browse/JBAS-5428
The idea of the ForceClear option is that if the MDB is busy,
the undeployment of the MDB will still proceed after a certain amount of waiting.
This test, doesn't test that behaviour. The MDB has no wait at all
| public void onMessage(Message message)
| {
| try
| {
| InitialContext jndiContext = new InitialContext();
| TestStatusHome statusHome = (TestStatusHome)jndiContext.lookup("TestStatus");
| TestStatus status = statusHome.create();
| int count = status.increment();
| log.info("**** Mdb got message " + count + " " + ((TextMessage)message).getText());
| }
| catch (Exception e)
| {
| e.printStackTrace();
| }
| }
|
So I don't see how it would ever block the undeploy?
The undeploy isn't even part of the test, it's in the test setup.
So we have an undocumentated feature, that broke the normal behaviour
and isn't actually tested.
It's a good job the person that did this work doesn't work for Redhat anymore. :-)
View the original post : http://www.jboss.com/index.html?module=bb&op=viewtopic&p=4160538#4160538
Reply to the post : http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&p=4160538
16 years