Clean up Joram test classes and enable all tests now using new client.
This commit is contained in:
Timothy Bish 2015-03-24 13:29:24 -04:00
parent 197dcb162e
commit cdb60d74b8
4 changed files with 55 additions and 45 deletions

View File

@ -42,19 +42,19 @@ import org.objectweb.jtests.jms.conform.selector.SelectorSyntaxTest;
import org.objectweb.jtests.jms.conform.selector.SelectorTest; import org.objectweb.jtests.jms.conform.selector.SelectorTest;
import org.objectweb.jtests.jms.conform.session.QueueSessionTest; import org.objectweb.jtests.jms.conform.session.QueueSessionTest;
import org.objectweb.jtests.jms.conform.session.SessionTest; import org.objectweb.jtests.jms.conform.session.SessionTest;
import org.objectweb.jtests.jms.conform.session.TopicSessionTest;
import org.objectweb.jtests.jms.conform.topic.TemporaryTopicTest; import org.objectweb.jtests.jms.conform.topic.TemporaryTopicTest;
import org.slf4j.Logger; import org.slf4j.Logger;
import org.slf4j.LoggerFactory; import org.slf4j.LoggerFactory;
@RunWith(Suite.class) @RunWith(Suite.class)
@Suite.SuiteClasses({ @Suite.SuiteClasses({
// TopicSessionTest.class, // Hangs, see https://issues.apache.org/jira/browse/PROTON-154 TopicSessionTest.class,
MessageHeaderTest.class, MessageHeaderTest.class,
QueueBrowserTest.class, QueueBrowserTest.class,
MessageTypeTest.class, MessageTypeTest.class,
//,UnifiedSessionTest.class // https://issues.apache.org/jira/browse/AMQ-4375
TemporaryTopicTest.class, TemporaryTopicTest.class,
TopicConnectionTest.class, // https://issues.apache.org/jira/browse/AMQ-4654 TopicConnectionTest.class,
SelectorSyntaxTest.class, SelectorSyntaxTest.class,
QueueSessionTest.class, QueueSessionTest.class,
SelectorTest.class, SelectorTest.class,
@ -76,6 +76,7 @@ public class JoramJmsNioPlusSslTest {
public Timeout to = new Timeout(10 * 1000); public Timeout to = new Timeout(10 * 1000);
private static SSLContext def; private static SSLContext def;
@BeforeClass @BeforeClass
public static void beforeClass() throws Exception { public static void beforeClass() throws Exception {
System.setProperty("joram.jms.test.file", getJmsTestFileName()); System.setProperty("joram.jms.test.file", getJmsTestFileName());
@ -85,6 +86,7 @@ public class JoramJmsNioPlusSslTest {
def = SSLContext.getDefault(); def = SSLContext.getDefault();
SSLContext.setDefault(ctx); SSLContext.setDefault(ctx);
} }
@AfterClass @AfterClass
public static void afterClass() throws Exception { public static void afterClass() throws Exception {
System.clearProperty("joram.jms.test.file"); System.clearProperty("joram.jms.test.file");

View File

@ -30,12 +30,13 @@ import org.objectweb.jtests.jms.conform.message.headers.MessageHeaderTest;
import org.objectweb.jtests.jms.conform.message.properties.JMSXPropertyTest; import org.objectweb.jtests.jms.conform.message.properties.JMSXPropertyTest;
import org.objectweb.jtests.jms.conform.message.properties.MessagePropertyConversionTest; import org.objectweb.jtests.jms.conform.message.properties.MessagePropertyConversionTest;
import org.objectweb.jtests.jms.conform.message.properties.MessagePropertyTest; import org.objectweb.jtests.jms.conform.message.properties.MessagePropertyTest;
import org.objectweb.jtests.jms.conform.queue.QueueBrowserTest;
import org.objectweb.jtests.jms.conform.queue.TemporaryQueueTest; import org.objectweb.jtests.jms.conform.queue.TemporaryQueueTest;
import org.objectweb.jtests.jms.conform.selector.SelectorSyntaxTest; import org.objectweb.jtests.jms.conform.selector.SelectorSyntaxTest;
import org.objectweb.jtests.jms.conform.selector.SelectorTest; import org.objectweb.jtests.jms.conform.selector.SelectorTest;
import org.objectweb.jtests.jms.conform.session.QueueSessionTest; import org.objectweb.jtests.jms.conform.session.QueueSessionTest;
import org.objectweb.jtests.jms.conform.session.SessionTest; import org.objectweb.jtests.jms.conform.session.SessionTest;
import org.objectweb.jtests.jms.conform.session.UnifiedSessionTest; import org.objectweb.jtests.jms.conform.session.TopicSessionTest;
import org.objectweb.jtests.jms.conform.topic.TemporaryTopicTest; import org.objectweb.jtests.jms.conform.topic.TemporaryTopicTest;
/** /**
@ -43,11 +44,10 @@ import org.objectweb.jtests.jms.conform.topic.TemporaryTopicTest;
*/ */
@RunWith(Suite.class) @RunWith(Suite.class)
@Suite.SuiteClasses({ @Suite.SuiteClasses({
// TopicSessionTest.class, // Hangs, see https://issues.apache.org/jira/browse/PROTON-154 TopicSessionTest.class,
MessageHeaderTest.class, MessageHeaderTest.class,
// QueueBrowserTest.class, // https://issues.apache.org/jira/browse/AMQ-4641 QueueBrowserTest.class,
MessageTypeTest.class, MessageTypeTest.class,
UnifiedSessionTest.class, // https://issues.apache.org/jira/browse/AMQ-4375
TemporaryTopicTest.class, TemporaryTopicTest.class,
TopicConnectionTest.class, TopicConnectionTest.class,
SelectorSyntaxTest.class, SelectorSyntaxTest.class,
@ -64,6 +64,7 @@ import org.objectweb.jtests.jms.conform.topic.TemporaryTopicTest;
}) })
public class JoramJmsNioTest { public class JoramJmsNioTest {
@Rule @Rule
public Timeout timeout = new Timeout(10 * 1000); public Timeout timeout = new Timeout(10 * 1000);

View File

@ -16,10 +16,12 @@
*/ */
package org.apache.activemq.transport.amqp.joram; package org.apache.activemq.transport.amqp.joram;
import junit.framework.Test; import org.junit.AfterClass;
import junit.framework.TestCase; import org.junit.BeforeClass;
import junit.framework.TestSuite; import org.junit.Rule;
import org.junit.rules.Timeout;
import org.junit.runner.RunWith;
import org.junit.runners.Suite;
import org.objectweb.jtests.jms.conform.connection.ConnectionTest; import org.objectweb.jtests.jms.conform.connection.ConnectionTest;
import org.objectweb.jtests.jms.conform.connection.TopicConnectionTest; import org.objectweb.jtests.jms.conform.connection.TopicConnectionTest;
import org.objectweb.jtests.jms.conform.message.MessageBodyTest; import org.objectweb.jtests.jms.conform.message.MessageBodyTest;
@ -35,41 +37,46 @@ import org.objectweb.jtests.jms.conform.selector.SelectorSyntaxTest;
import org.objectweb.jtests.jms.conform.selector.SelectorTest; import org.objectweb.jtests.jms.conform.selector.SelectorTest;
import org.objectweb.jtests.jms.conform.session.QueueSessionTest; import org.objectweb.jtests.jms.conform.session.QueueSessionTest;
import org.objectweb.jtests.jms.conform.session.SessionTest; import org.objectweb.jtests.jms.conform.session.SessionTest;
import org.objectweb.jtests.jms.conform.session.TopicSessionTest;
import org.objectweb.jtests.jms.conform.topic.TemporaryTopicTest; import org.objectweb.jtests.jms.conform.topic.TemporaryTopicTest;
public class JoramJmsTest extends TestCase { @RunWith(Suite.class)
@Suite.SuiteClasses({
TopicSessionTest.class,
MessageHeaderTest.class,
QueueBrowserTest.class,
MessageTypeTest.class,
TemporaryTopicTest.class,
TopicConnectionTest.class,
SelectorSyntaxTest.class,
QueueSessionTest.class,
SelectorTest.class,
TemporaryQueueTest.class,
ConnectionTest.class,
SessionTest.class,
JMSXPropertyTest.class,
MessageBodyTest.class,
MessageDefaultTest.class,
MessagePropertyConversionTest.class,
MessagePropertyTest.class
})
public static Test suite() { public class JoramJmsTest {
TestSuite suite = new TestSuite();
// TODO: Fix these tests.. @Rule
// Fails due to public Timeout timeout = new Timeout(10 * 1000);
// https://issues.apache.org/jira/browse/PROTON-154
// suite.addTestSuite(TopicSessionTest.class);
// Passing tests @BeforeClass
suite.addTestSuite(MessageHeaderTest.class); public static void beforeClass() throws Exception {
suite.addTestSuite(QueueBrowserTest.class); System.setProperty("joram.jms.test.file", getJmsTestFileName());
suite.addTestSuite(MessageTypeTest.class);
// suite.addTestSuite(UnifiedSessionTest.class); // https://issues.apache.org/jira/browse/AMQ-4375
suite.addTestSuite(TemporaryTopicTest.class);
suite.addTestSuite(TopicConnectionTest.class);
suite.addTestSuite(SelectorSyntaxTest.class);
suite.addTestSuite(QueueSessionTest.class);
suite.addTestSuite(SelectorTest.class);
suite.addTestSuite(TemporaryQueueTest.class);
suite.addTestSuite(ConnectionTest.class);
suite.addTestSuite(SessionTest.class);
suite.addTestSuite(JMSXPropertyTest.class);
suite.addTestSuite(MessageBodyTest.class);
suite.addTestSuite(MessageDefaultTest.class);
suite.addTestSuite(MessagePropertyConversionTest.class);
suite.addTestSuite(MessagePropertyTest.class);
return suite;
} }
public static void main(String[] args) { @AfterClass
junit.textui.TestRunner.run(suite()); public static void afterClass() throws Exception {
System.clearProperty("joram.jms.test.file");
}
public static String getJmsTestFileName() {
return "provider.properties";
} }
} }

View File

@ -28,6 +28,7 @@ import org.junit.rules.Timeout;
import org.junit.runner.RunWith; import org.junit.runner.RunWith;
import org.junit.runners.Suite; import org.junit.runners.Suite;
import org.objectweb.jtests.jms.conform.connection.ConnectionTest; import org.objectweb.jtests.jms.conform.connection.ConnectionTest;
import org.objectweb.jtests.jms.conform.connection.TopicConnectionTest;
import org.objectweb.jtests.jms.conform.message.MessageBodyTest; import org.objectweb.jtests.jms.conform.message.MessageBodyTest;
import org.objectweb.jtests.jms.conform.message.MessageDefaultTest; import org.objectweb.jtests.jms.conform.message.MessageDefaultTest;
import org.objectweb.jtests.jms.conform.message.MessageTypeTest; import org.objectweb.jtests.jms.conform.message.MessageTypeTest;
@ -41,20 +42,19 @@ import org.objectweb.jtests.jms.conform.selector.SelectorSyntaxTest;
import org.objectweb.jtests.jms.conform.selector.SelectorTest; import org.objectweb.jtests.jms.conform.selector.SelectorTest;
import org.objectweb.jtests.jms.conform.session.QueueSessionTest; import org.objectweb.jtests.jms.conform.session.QueueSessionTest;
import org.objectweb.jtests.jms.conform.session.SessionTest; import org.objectweb.jtests.jms.conform.session.SessionTest;
import org.objectweb.jtests.jms.conform.session.UnifiedSessionTest; import org.objectweb.jtests.jms.conform.session.TopicSessionTest;
import org.objectweb.jtests.jms.conform.topic.TemporaryTopicTest; import org.objectweb.jtests.jms.conform.topic.TemporaryTopicTest;
import org.slf4j.Logger; import org.slf4j.Logger;
import org.slf4j.LoggerFactory; import org.slf4j.LoggerFactory;
@RunWith(Suite.class) @RunWith(Suite.class)
@Suite.SuiteClasses({ @Suite.SuiteClasses({
// TopicSessionTest.class, // Hangs, see https://issues.apache.org/jira/browse/PROTON-154 TopicSessionTest.class,
MessageHeaderTest.class, MessageHeaderTest.class,
QueueBrowserTest.class, QueueBrowserTest.class,
MessageTypeTest.class, MessageTypeTest.class,
UnifiedSessionTest.class, // https://issues.apache.org/jira/browse/AMQ-4375
TemporaryTopicTest.class, TemporaryTopicTest.class,
//,TopicConnectionTest.class // https://issues.apache.org/jira/browse/AMQ-4654 TopicConnectionTest.class,
SelectorSyntaxTest.class, SelectorSyntaxTest.class,
QueueSessionTest.class, QueueSessionTest.class,
SelectorTest.class, SelectorTest.class,
@ -85,13 +85,13 @@ public class JoramSslTest {
def = SSLContext.getDefault(); def = SSLContext.getDefault();
SSLContext.setDefault(ctx); SSLContext.setDefault(ctx);
} }
@AfterClass @AfterClass
public static void afterClass() throws Exception { public static void afterClass() throws Exception {
System.clearProperty("joram.jms.test.file"); System.clearProperty("joram.jms.test.file");
SSLContext.setDefault(def); SSLContext.setDefault(def);
} }
public static String getJmsTestFileName() { public static String getJmsTestFileName() {
return "providerSSL.properties"; return "providerSSL.properties";
} }