[jboss-cvs] JBossAS SVN: r71642 - in branches/JBPAPP_4_2_0_GA_CP/testsuite/src/main/org/jboss/test/jbossmessaging: test and 1 other directory.
jboss-cvs-commits at lists.jboss.org
jboss-cvs-commits at lists.jboss.org
Wed Apr 2 18:08:35 EDT 2008
Author: clebert.suconic at jboss.com
Date: 2008-04-02 18:08:35 -0400 (Wed, 02 Apr 2008)
New Revision: 71642
Modified:
branches/JBPAPP_4_2_0_GA_CP/testsuite/src/main/org/jboss/test/jbossmessaging/JMSBase.java
branches/JBPAPP_4_2_0_GA_CP/testsuite/src/main/org/jboss/test/jbossmessaging/test/SecurityUnitTestCase.java
Log:
Fixing test flaws
Modified: branches/JBPAPP_4_2_0_GA_CP/testsuite/src/main/org/jboss/test/jbossmessaging/JMSBase.java
===================================================================
--- branches/JBPAPP_4_2_0_GA_CP/testsuite/src/main/org/jboss/test/jbossmessaging/JMSBase.java 2008-04-02 22:04:14 UTC (rev 71641)
+++ branches/JBPAPP_4_2_0_GA_CP/testsuite/src/main/org/jboss/test/jbossmessaging/JMSBase.java 2008-04-02 22:08:35 UTC (rev 71642)
@@ -113,7 +113,7 @@
}
}
- public void drainTopic() throws JMSException
+ public void drainTopic() throws Exception
{
TopicWorker sub1 = new TopicWorker(GETTER,
TRANS_NONE,
@@ -766,6 +766,8 @@
public void unsubscribe() throws JMSException
{
+ consumer.close();
+ consumer = null;
if (durableHandle != null)
((TopicSession) session).unsubscribe(durableHandle);
}
Modified: branches/JBPAPP_4_2_0_GA_CP/testsuite/src/main/org/jboss/test/jbossmessaging/test/SecurityUnitTestCase.java
===================================================================
--- branches/JBPAPP_4_2_0_GA_CP/testsuite/src/main/org/jboss/test/jbossmessaging/test/SecurityUnitTestCase.java 2008-04-02 22:04:14 UTC (rev 71641)
+++ branches/JBPAPP_4_2_0_GA_CP/testsuite/src/main/org/jboss/test/jbossmessaging/test/SecurityUnitTestCase.java 2008-04-02 22:08:35 UTC (rev 71642)
@@ -1027,11 +1027,11 @@
catch (Exception ex)
{
}
+
+ sub1.unsubscribe();
+
try
{
- // if this stops working it might be that we have become spec
- // compliant an do not allow unsubscribe with an open consumer.
- sub1.unsubscribe();
sub1.close();
}
catch (Exception ex)
@@ -1119,11 +1119,9 @@
catch (Exception ex)
{
}
+ sub1.unsubscribe();
try
{
- // if this stops working it might be that we have become spec
- // compliant an do not allow unsubscribe with an open consumer.
- sub1.unsubscribe();
sub1.close();
}
catch (Exception ex)
More information about the jboss-cvs-commits
mailing list