diff options
| author | Andrew Donald Kennedy <grkvlt@apache.org> | 2010-08-13 16:16:16 +0000 |
|---|---|---|
| committer | Andrew Donald Kennedy <grkvlt@apache.org> | 2010-08-13 16:16:16 +0000 |
| commit | 55d8df04c76b21a503e6a663e0979fbde9eedfb2 (patch) | |
| tree | 41137b9b76c55d567d5de79a208daffb98ce09f1 /qpid/java | |
| parent | bb1393cd1a547ae84746f30af2c280fe80377644 (diff) | |
| download | qpid-python-55d8df04c76b21a503e6a663e0979fbde9eedfb2.tar.gz | |
Tidy up various badly named tests
git-svn-id: https://svn.apache.org/repos/asf/qpid/trunk@985259 13f79535-47bb-0310-9956-ffa450edef68
Diffstat (limited to 'qpid/java')
9 files changed, 49 insertions, 59 deletions
diff --git a/qpid/java/broker/src/test/java/org/apache/qpid/server/store/TestReferenceCounting.java b/qpid/java/broker/src/test/java/org/apache/qpid/server/store/ReferenceCountingTest.java index c5b1ba7868..a75cbe8662 100644 --- a/qpid/java/broker/src/test/java/org/apache/qpid/server/store/TestReferenceCounting.java +++ b/qpid/java/broker/src/test/java/org/apache/qpid/server/store/ReferenceCountingTest.java @@ -20,28 +20,26 @@ */ package org.apache.qpid.server.store; -import junit.framework.TestCase; import org.apache.qpid.AMQException; +import org.apache.qpid.framing.AMQShortString; import org.apache.qpid.framing.BasicContentHeaderProperties; import org.apache.qpid.framing.ContentHeaderBody; -import org.apache.qpid.framing.AMQShortString; import org.apache.qpid.framing.abstraction.MessagePublishInfo; import org.apache.qpid.server.message.AMQMessage; import org.apache.qpid.server.message.MessageMetaData; +import org.apache.qpid.test.utils.QpidTestCase; /** * Tests that reference counting works correctly with AMQMessage and the message store */ -public class TestReferenceCounting extends TestCase +public class ReferenceCountingTest extends QpidTestCase { private TestMemoryMessageStore _store; protected void setUp() throws Exception { - super.setUp(); _store = new TestMemoryMessageStore(); - } /** @@ -96,7 +94,7 @@ public class TestReferenceCounting extends TestCase assertEquals(1, _store.getMessageCount()); message.decrementReference(); - assertEquals(1, _store.getMessageCount()); + assertEquals(0, _store.getMessageCount()); } private ContentHeaderBody createPersistentContentHeader() @@ -152,8 +150,6 @@ public class TestReferenceCounting extends TestCase // we call routing complete to set up the handle // message.routingComplete(_store, _storeContext, new MessageHandleFactory()); - - assertEquals(1, _store.getMessageCount()); message = message.takeReference(); message.decrementReference(); @@ -162,6 +158,6 @@ public class TestReferenceCounting extends TestCase public static junit.framework.Test suite() { - return new junit.framework.TestSuite(TestReferenceCounting.class); + return new junit.framework.TestSuite(ReferenceCountingTest.class); } } diff --git a/qpid/java/client/src/main/java/org/apache/qpid/client/AMQSession_0_10.java b/qpid/java/client/src/main/java/org/apache/qpid/client/AMQSession_0_10.java index 74cd0c8b78..d24ad46512 100644 --- a/qpid/java/client/src/main/java/org/apache/qpid/client/AMQSession_0_10.java +++ b/qpid/java/client/src/main/java/org/apache/qpid/client/AMQSession_0_10.java @@ -47,7 +47,7 @@ import org.apache.qpid.client.failover.FailoverException; import org.apache.qpid.client.failover.FailoverNoopSupport; import org.apache.qpid.client.failover.FailoverProtectedOperation; import org.apache.qpid.client.message.AMQMessageDelegateFactory; -import org.apache.qpid.client.message.FiledTableSupport; +import org.apache.qpid.client.message.FieldTableSupport; import org.apache.qpid.client.message.MessageFactoryRegistry; import org.apache.qpid.client.message.UnprocessedMessage_0_10; import org.apache.qpid.client.messaging.address.Node.ExchangeNode; @@ -320,7 +320,7 @@ public class AMQSession_0_10 extends AMQSession<BasicMessageConsumer_0_10, Basic { if (destination.getDestSyntax() == DestSyntax.BURL) { - Map args = FiledTableSupport.convertToMap(arguments); + Map args = FieldTableSupport.convertToMap(arguments); // this is there only because the broker may expect a value for x-match if( ! args.containsKey("x-match") ) { diff --git a/qpid/java/client/src/main/java/org/apache/qpid/client/AMQTestConnection_0_10.java b/qpid/java/client/src/main/java/org/apache/qpid/client/AMQTestConnection_0_10.java deleted file mode 100644 index 98cb5d0d57..0000000000 --- a/qpid/java/client/src/main/java/org/apache/qpid/client/AMQTestConnection_0_10.java +++ /dev/null @@ -1,36 +0,0 @@ -/* - * - * Licensed to the Apache Software Foundation (ASF) under one - * or more contributor license agreements. See the NOTICE file - * distributed with this work for additional information - * regarding copyright ownership. The ASF licenses this file - * to you under the Apache License, Version 2.0 (the - * "License"); you may not use this file except in compliance - * with the License. You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, - * software distributed under the License is distributed on an - * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY - * KIND, either express or implied. See the License for the - * specific language governing permissions and limitations - * under the License. - * - */ -package org.apache.qpid.client; - -import org.apache.qpid.transport.Connection; - -public class AMQTestConnection_0_10 extends AMQConnection -{ - public AMQTestConnection_0_10(String url) throws Exception - { - super(url); - } - - public Connection getConnection() - { - return((AMQConnectionDelegate_0_10)_delegate).getQpidConnection(); - } -} diff --git a/qpid/java/client/src/main/java/org/apache/qpid/client/message/FiledTableSupport.java b/qpid/java/client/src/main/java/org/apache/qpid/client/message/FieldTableSupport.java index 5b8a4ce878..49ae8c14b2 100644 --- a/qpid/java/client/src/main/java/org/apache/qpid/client/message/FiledTableSupport.java +++ b/qpid/java/client/src/main/java/org/apache/qpid/client/message/FieldTableSupport.java @@ -20,15 +20,13 @@ package org.apache.qpid.client.message; * */ - -import java.util.Enumeration; import java.util.HashMap; import java.util.Map; import org.apache.qpid.framing.AMQShortString; import org.apache.qpid.framing.FieldTable; -public class FiledTableSupport +public class FieldTableSupport { public static FieldTable convertToFieldTable(Map<String,?> props) { diff --git a/qpid/java/broker/src/test/java/org/apache/qpid/server/configuration/TestPropertyUtils.java b/qpid/java/common/src/test/java/org/apache/qpid/util/PropertyUtilsTest.java index 3b83190e42..9fd18d461a 100644 --- a/qpid/java/broker/src/test/java/org/apache/qpid/server/configuration/TestPropertyUtils.java +++ b/qpid/java/common/src/test/java/org/apache/qpid/util/PropertyUtilsTest.java @@ -18,15 +18,13 @@ * under the License. * */ -package org.apache.qpid.server.configuration; +package org.apache.qpid.util; import org.apache.qpid.configuration.PropertyException; import org.apache.qpid.configuration.PropertyUtils; +import org.apache.qpid.test.utils.QpidTestCase; -import junit.framework.TestCase; - -// TODO: This belongs in the "common" module. -public class TestPropertyUtils extends TestCase +public class PropertyUtilsTest extends QpidTestCase { public void testSimpleExpansion() throws PropertyException { @@ -45,6 +43,6 @@ public class TestPropertyUtils extends TestCase public static junit.framework.Test suite() { - return new junit.framework.TestSuite(TestPropertyUtils.class); + return new junit.framework.TestSuite(PropertyUtilsTest.class); } } diff --git a/qpid/java/systests/src/main/java/org/apache/qpid/client/AMQTestConnection_0_10.java b/qpid/java/systests/src/main/java/org/apache/qpid/client/AMQTestConnection_0_10.java new file mode 100644 index 0000000000..09a03a17a0 --- /dev/null +++ b/qpid/java/systests/src/main/java/org/apache/qpid/client/AMQTestConnection_0_10.java @@ -0,0 +1,34 @@ +/* + * Licensed to the Apache Software Foundation (ASF) under one + * or more contributor license agreements. See the NOTICE file + * distributed with this work for additional information + * regarding copyright ownership. The ASF licenses this file + * to you under the Apache License, Version 2.0 (the + * "License"); you may not use this file except in compliance + * with the License. You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, + * software distributed under the License is distributed on an + * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY + * KIND, either express or implied. See the License for the + * specific language governing permissions and limitations + * under the License. + */ +package org.apache.qpid.client; + +import org.apache.qpid.transport.Connection; + +public class AMQTestConnection_0_10 extends AMQConnection +{ + public AMQTestConnection_0_10(String url) throws Exception + { + super(url); + } + + public Connection getConnection() + { + return((AMQConnectionDelegate_0_10)_delegate).getQpidConnection(); + } +} diff --git a/qpid/java/systests/src/main/java/org/apache/qpid/test/unit/publish/DirtyTrasactedPubilshTest.java b/qpid/java/systests/src/main/java/org/apache/qpid/test/unit/publish/DirtyTransactedPublishTest.java index 248042d2c4..3ec7937812 100644 --- a/qpid/java/systests/src/main/java/org/apache/qpid/test/unit/publish/DirtyTrasactedPubilshTest.java +++ b/qpid/java/systests/src/main/java/org/apache/qpid/test/unit/publish/DirtyTransactedPublishTest.java @@ -46,7 +46,7 @@ import java.util.concurrent.atomic.AtomicReference; * and asynchronous message delivery paths we receive the expected exceptions at * the expected time. */ -public class DirtyTrasactedPubilshTest extends FailoverBaseCase implements ConnectionListener +public class DirtyTransactedPublishTest extends FailoverBaseCase implements ConnectionListener { protected CountDownLatch _failoverCompleted = new CountDownLatch(1); diff --git a/qpid/java/test-profiles/CPPExcludes b/qpid/java/test-profiles/CPPExcludes index 79e8e88c90..fe1ce82b7e 100755 --- a/qpid/java/test-profiles/CPPExcludes +++ b/qpid/java/test-profiles/CPPExcludes @@ -117,7 +117,7 @@ org.apache.qpid.server.failover.MessageDisappearWithIOExceptionTest#* // These are recent test additions that are failing with the c++ broker // Temporarily disabling until properly investigated. -org.apache.qpid.test.unit.publish.DirtyTrasactedPubilshTest#* +org.apache.qpid.test.unit.publish.DirtyTransactedPublishTest#* org.apache.qpid.test.unit.ack.FailoverBeforeConsumingRecoverTest#* org.apache.qpid.test.client.RollbackOrderTest#testOrderingAfterRollbackOnMessage#* diff --git a/qpid/java/test-profiles/Java010Excludes b/qpid/java/test-profiles/Java010Excludes index 51781a85fd..9624464d71 100755 --- a/qpid/java/test-profiles/Java010Excludes +++ b/qpid/java/test-profiles/Java010Excludes @@ -46,7 +46,7 @@ org.apache.qpid.server.queue.ProducerFlowControlTest#* org.apache.qpid.server.failover.MessageDisappearWithIOExceptionTest#* // Temporarily disabling until properly investigated. -org.apache.qpid.test.unit.publish.DirtyTrasactedPubilshTest#* +org.apache.qpid.test.unit.publish.DirtyTransactedPublishTest#* //rollback with subscriptions does not work in 0-10 yet org.apache.qpid.test.client.RollbackOrderTest#testOrderingAfterRollbackOnMessage |
