You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@qpid.apache.org by or...@apache.org on 2016/11/18 09:27:01 UTC

svn commit: r1770346 - in /qpid/java/trunk: broker-core/src/test/java/org/apache/qpid/server/model/adapter/ broker-core/src/test/java/org/apache/qpid/server/queue/ broker-core/src/test/java/org/apache/qpid/server/security/auth/manager/ broker-plugins/a...

Author: orudyy
Date: Fri Nov 18 09:27:01 2016
New Revision: 1770346

URL: http://svn.apache.org/viewvc?rev=1770346&view=rev
Log:
QPID-7526: Test should call super.setUp() and super.tearDown() from their setUp and tearDown methods accordingly

Modified:
    qpid/java/trunk/broker-core/src/test/java/org/apache/qpid/server/model/adapter/PortFactoryTest.java
    qpid/java/trunk/broker-core/src/test/java/org/apache/qpid/server/queue/PriorityQueueListTest.java
    qpid/java/trunk/broker-core/src/test/java/org/apache/qpid/server/queue/StandardQueueEntryListTest.java
    qpid/java/trunk/broker-core/src/test/java/org/apache/qpid/server/security/auth/manager/AnonymousAuthenticationManagerTest.java
    qpid/java/trunk/broker-plugins/access-control/src/test/java/org/apache/qpid/server/security/access/config/AclRulePredicatesTest.java
    qpid/java/trunk/broker-plugins/access-control/src/test/java/org/apache/qpid/server/security/access/firewall/HostnameFirewallRuleTest.java
    qpid/java/trunk/broker-plugins/access-control/src/test/java/org/apache/qpid/server/security/access/firewall/NetworkFirewallRuleTest.java
    qpid/java/trunk/broker-plugins/amqp-0-8-protocol/src/test/java/org/apache/qpid/server/protocol/v0_8/ReferenceCountingTest.java
    qpid/java/trunk/client/src/test/java/org/apache/qpid/client/AMQSession_0_8Test.java
    qpid/java/trunk/client/src/test/java/org/apache/qpid/client/protocol/AMQProtocolHandlerTest.java
    qpid/java/trunk/client/src/test/java/org/apache/qpid/client/util/ClassLoadingAwareObjectInputStreamTest.java
    qpid/java/trunk/common/src/test/java/org/apache/qpid/codec/AMQDecoderTest.java
    qpid/java/trunk/common/src/test/java/org/apache/qpid/framing/BasicContentHeaderPropertiesTest.java
    qpid/java/trunk/common/src/test/java/org/apache/qpid/framing/abstraction/MessagePublishInfoImplTest.java
    qpid/java/trunk/common/src/test/java/org/apache/qpid/util/ByteBufferInputStreamTest.java
    qpid/java/trunk/perftests/src/test/java/org/apache/qpid/disttest/ConfigFileHelperTest.java
    qpid/java/trunk/perftests/src/test/java/org/apache/qpid/disttest/controller/config/ConfigReaderTest.java
    qpid/java/trunk/perftests/src/test/java/org/apache/qpid/disttest/results/ResultsCsvWriterTest.java
    qpid/java/trunk/perftests/visualisation-jfc/src/test/java/org/apache/qpid/disttest/charting/writer/ChartWriterTest.java
    qpid/java/trunk/systests/src/test/java/org/apache/qpid/client/TemporaryQueuePrefixTest.java
    qpid/java/trunk/systests/src/test/java/org/apache/qpid/server/SupportedProtocolVersionsTest.java
    qpid/java/trunk/systests/src/test/java/org/apache/qpid/systest/messageencryption/MessageEncryptionTest.java
    qpid/java/trunk/systests/src/test/java/org/apache/qpid/systest/rest/CompressedResponsesRestTest.java
    qpid/java/trunk/systests/src/test/java/org/apache/qpid/systest/rest/KeyStoreRestTest.java
    qpid/java/trunk/systests/src/test/java/org/apache/qpid/systest/rest/TrustStoreRestTest.java
    qpid/java/trunk/systests/src/test/java/org/apache/qpid/systest/rest/acl/GroupRestACLTest.java
    qpid/java/trunk/systests/src/test/java/org/apache/qpid/test/utils/BrokerCommandHelperTest.java
    qpid/java/trunk/systests/src/test/java/org/apache/qpid/transport/MaxFrameSizeTest.java

Modified: qpid/java/trunk/broker-core/src/test/java/org/apache/qpid/server/model/adapter/PortFactoryTest.java
URL: http://svn.apache.org/viewvc/qpid/java/trunk/broker-core/src/test/java/org/apache/qpid/server/model/adapter/PortFactoryTest.java?rev=1770346&r1=1770345&r2=1770346&view=diff
==============================================================================
--- qpid/java/trunk/broker-core/src/test/java/org/apache/qpid/server/model/adapter/PortFactoryTest.java (original)
+++ qpid/java/trunk/broker-core/src/test/java/org/apache/qpid/server/model/adapter/PortFactoryTest.java Fri Nov 18 09:27:01 2016
@@ -78,6 +78,7 @@ public class PortFactoryTest extends Qpi
     @Override
     protected void setUp() throws Exception
     {
+        super.setUp();
         SystemConfig systemConfig = mock(SystemConfig.class);
         _portNumber = findFreePort();
         TaskExecutor executor = CurrentThreadTaskExecutor.newStartedInstance();

Modified: qpid/java/trunk/broker-core/src/test/java/org/apache/qpid/server/queue/PriorityQueueListTest.java
URL: http://svn.apache.org/viewvc/qpid/java/trunk/broker-core/src/test/java/org/apache/qpid/server/queue/PriorityQueueListTest.java?rev=1770346&r1=1770345&r2=1770346&view=diff
==============================================================================
--- qpid/java/trunk/broker-core/src/test/java/org/apache/qpid/server/queue/PriorityQueueListTest.java (original)
+++ qpid/java/trunk/broker-core/src/test/java/org/apache/qpid/server/queue/PriorityQueueListTest.java Fri Nov 18 09:27:01 2016
@@ -54,8 +54,9 @@ public class PriorityQueueListTest exten
     private QueueEntry _priority5message1;
     private QueueEntry _priority5message2;
 
-    protected void setUp()
+    protected void setUp() throws Exception
     {
+        super.setUp();
         BrokerTestHelper.setUp();
         QueueEntry[] entries = new QueueEntry[PRIORITIES.length];
         Map<String,Object> queueAttributes = new HashMap<String, Object>();

Modified: qpid/java/trunk/broker-core/src/test/java/org/apache/qpid/server/queue/StandardQueueEntryListTest.java
URL: http://svn.apache.org/viewvc/qpid/java/trunk/broker-core/src/test/java/org/apache/qpid/server/queue/StandardQueueEntryListTest.java?rev=1770346&r1=1770345&r2=1770346&view=diff
==============================================================================
--- qpid/java/trunk/broker-core/src/test/java/org/apache/qpid/server/queue/StandardQueueEntryListTest.java (original)
+++ qpid/java/trunk/broker-core/src/test/java/org/apache/qpid/server/queue/StandardQueueEntryListTest.java Fri Nov 18 09:27:01 2016
@@ -52,8 +52,9 @@ public class StandardQueueEntryListTest
     private ConfiguredObjectFactoryImpl _factory;
 
     @Override
-    protected void setUp()
+    protected void setUp() throws Exception
     {
+        super.setUp();
         Map<String,Object> queueAttributes = new HashMap<String, Object>();
         queueAttributes.put(Queue.ID, UUID.randomUUID());
         queueAttributes.put(Queue.NAME, getName());

Modified: qpid/java/trunk/broker-core/src/test/java/org/apache/qpid/server/security/auth/manager/AnonymousAuthenticationManagerTest.java
URL: http://svn.apache.org/viewvc/qpid/java/trunk/broker-core/src/test/java/org/apache/qpid/server/security/auth/manager/AnonymousAuthenticationManagerTest.java?rev=1770346&r1=1770345&r2=1770346&view=diff
==============================================================================
--- qpid/java/trunk/broker-core/src/test/java/org/apache/qpid/server/security/auth/manager/AnonymousAuthenticationManagerTest.java (original)
+++ qpid/java/trunk/broker-core/src/test/java/org/apache/qpid/server/security/auth/manager/AnonymousAuthenticationManagerTest.java Fri Nov 18 09:27:01 2016
@@ -56,6 +56,7 @@ public class AnonymousAuthenticationMana
         {
             _manager = null;
         }
+        super.tearDown();
     }
 
     public void testGetMechanisms() throws Exception

Modified: qpid/java/trunk/broker-plugins/access-control/src/test/java/org/apache/qpid/server/security/access/config/AclRulePredicatesTest.java
URL: http://svn.apache.org/viewvc/qpid/java/trunk/broker-plugins/access-control/src/test/java/org/apache/qpid/server/security/access/config/AclRulePredicatesTest.java?rev=1770346&r1=1770345&r2=1770346&view=diff
==============================================================================
--- qpid/java/trunk/broker-plugins/access-control/src/test/java/org/apache/qpid/server/security/access/config/AclRulePredicatesTest.java (original)
+++ qpid/java/trunk/broker-plugins/access-control/src/test/java/org/apache/qpid/server/security/access/config/AclRulePredicatesTest.java Fri Nov 18 09:27:01 2016
@@ -35,6 +35,7 @@ public class AclRulePredicatesTest exten
     @Override
     protected void setUp() throws Exception
     {
+        super.setUp();
         _aclRulePredicates.setFirewallRuleFactory(_firewallRuleFactory);
 
         when(_firewallRuleFactory.createForHostname((String[]) any())).thenReturn(mock(FirewallRule.class));

Modified: qpid/java/trunk/broker-plugins/access-control/src/test/java/org/apache/qpid/server/security/access/firewall/HostnameFirewallRuleTest.java
URL: http://svn.apache.org/viewvc/qpid/java/trunk/broker-plugins/access-control/src/test/java/org/apache/qpid/server/security/access/firewall/HostnameFirewallRuleTest.java?rev=1770346&r1=1770345&r2=1770346&view=diff
==============================================================================
--- qpid/java/trunk/broker-plugins/access-control/src/test/java/org/apache/qpid/server/security/access/firewall/HostnameFirewallRuleTest.java (original)
+++ qpid/java/trunk/broker-plugins/access-control/src/test/java/org/apache/qpid/server/security/access/firewall/HostnameFirewallRuleTest.java Fri Nov 18 09:27:01 2016
@@ -36,6 +36,7 @@ public class HostnameFirewallRuleTest ex
     @Override
     protected void setUp() throws Exception
     {
+        super.setUp();
         _addressNotInRule = InetAddress.getByName("127.0.0.1");
     }
 

Modified: qpid/java/trunk/broker-plugins/access-control/src/test/java/org/apache/qpid/server/security/access/firewall/NetworkFirewallRuleTest.java
URL: http://svn.apache.org/viewvc/qpid/java/trunk/broker-plugins/access-control/src/test/java/org/apache/qpid/server/security/access/firewall/NetworkFirewallRuleTest.java?rev=1770346&r1=1770345&r2=1770346&view=diff
==============================================================================
--- qpid/java/trunk/broker-plugins/access-control/src/test/java/org/apache/qpid/server/security/access/firewall/NetworkFirewallRuleTest.java (original)
+++ qpid/java/trunk/broker-plugins/access-control/src/test/java/org/apache/qpid/server/security/access/firewall/NetworkFirewallRuleTest.java Fri Nov 18 09:27:01 2016
@@ -37,6 +37,7 @@ public class NetworkFirewallRuleTest ext
     @Override
     protected void setUp() throws Exception
     {
+        super.setUp();
         _addressNotInRule = InetAddress.getByName(LOCALHOST_IP);
     }
 

Modified: qpid/java/trunk/broker-plugins/amqp-0-8-protocol/src/test/java/org/apache/qpid/server/protocol/v0_8/ReferenceCountingTest.java
URL: http://svn.apache.org/viewvc/qpid/java/trunk/broker-plugins/amqp-0-8-protocol/src/test/java/org/apache/qpid/server/protocol/v0_8/ReferenceCountingTest.java?rev=1770346&r1=1770345&r2=1770346&view=diff
==============================================================================
--- qpid/java/trunk/broker-plugins/amqp-0-8-protocol/src/test/java/org/apache/qpid/server/protocol/v0_8/ReferenceCountingTest.java (original)
+++ qpid/java/trunk/broker-plugins/amqp-0-8-protocol/src/test/java/org/apache/qpid/server/protocol/v0_8/ReferenceCountingTest.java Fri Nov 18 09:27:01 2016
@@ -46,6 +46,7 @@ public class ReferenceCountingTest exten
 
     protected void setUp() throws Exception
     {
+        super.setUp();
         _store = new TestMemoryMessageStore();
     }
 

Modified: qpid/java/trunk/client/src/test/java/org/apache/qpid/client/AMQSession_0_8Test.java
URL: http://svn.apache.org/viewvc/qpid/java/trunk/client/src/test/java/org/apache/qpid/client/AMQSession_0_8Test.java?rev=1770346&r1=1770345&r2=1770346&view=diff
==============================================================================
--- qpid/java/trunk/client/src/test/java/org/apache/qpid/client/AMQSession_0_8Test.java (original)
+++ qpid/java/trunk/client/src/test/java/org/apache/qpid/client/AMQSession_0_8Test.java Fri Nov 18 09:27:01 2016
@@ -48,6 +48,7 @@ public class AMQSession_0_8Test extends
 
     public void setUp() throws Exception
     {
+        super.setUp();
         _connection = new MockAMQConnection("amqp://guest:guest@/test?brokerlist='tcp://localhost:5672'");
         NetworkConnection network = new TestNetworkConnection();
         _connection.getProtocolHandler().setNetworkConnection(network);

Modified: qpid/java/trunk/client/src/test/java/org/apache/qpid/client/protocol/AMQProtocolHandlerTest.java
URL: http://svn.apache.org/viewvc/qpid/java/trunk/client/src/test/java/org/apache/qpid/client/protocol/AMQProtocolHandlerTest.java?rev=1770346&r1=1770345&r2=1770346&view=diff
==============================================================================
--- qpid/java/trunk/client/src/test/java/org/apache/qpid/client/protocol/AMQProtocolHandlerTest.java (original)
+++ qpid/java/trunk/client/src/test/java/org/apache/qpid/client/protocol/AMQProtocolHandlerTest.java Fri Nov 18 09:27:01 2016
@@ -79,6 +79,7 @@ public class AMQProtocolHandlerTest exte
     @Override
     public void setUp() throws Exception
     {
+        super.setUp();
         //Create a new ProtocolHandler with a fake connection.
         _handler = new AMQProtocolHandler(new MockAMQConnection("amqp://guest:guest@client/test?brokerlist='tcp://localhost:1'"));
         _handler.setNetworkConnection(new TestNetworkConnection());

Modified: qpid/java/trunk/client/src/test/java/org/apache/qpid/client/util/ClassLoadingAwareObjectInputStreamTest.java
URL: http://svn.apache.org/viewvc/qpid/java/trunk/client/src/test/java/org/apache/qpid/client/util/ClassLoadingAwareObjectInputStreamTest.java?rev=1770346&r1=1770345&r2=1770346&view=diff
==============================================================================
--- qpid/java/trunk/client/src/test/java/org/apache/qpid/client/util/ClassLoadingAwareObjectInputStreamTest.java (original)
+++ qpid/java/trunk/client/src/test/java/org/apache/qpid/client/util/ClassLoadingAwareObjectInputStreamTest.java Fri Nov 18 09:27:01 2016
@@ -60,6 +60,7 @@ public class ClassLoadingAwareObjectInpu
 
     protected void setUp() throws Exception
     {
+        super.setUp();
         //Create a viable input stream for instantiating the CLA OIS
         ByteArrayOutputStream baos = new ByteArrayOutputStream();
 
@@ -89,7 +90,7 @@ public class ClassLoadingAwareObjectInpu
         Class<?> clazz = _claOIS.resolveProxyClass(new String[]{"java.lang.CharSequence"});
 
         //verify the proxy supports the expected interface (only)
-        List<Class<?>> interfaces = Arrays.asList(clazz.getInterfaces());
+        List<Class<?>> interfaces = Arrays.<Class<?>>asList(clazz.getInterfaces());
         assertTrue("Unexpected interfaces supported by proxy", interfaces.contains(CharSequence.class));
         assertEquals("Unexpected interfaces supported by proxy", 1, interfaces.size());
     }

Modified: qpid/java/trunk/common/src/test/java/org/apache/qpid/codec/AMQDecoderTest.java
URL: http://svn.apache.org/viewvc/qpid/java/trunk/common/src/test/java/org/apache/qpid/codec/AMQDecoderTest.java?rev=1770346&r1=1770345&r2=1770346&view=diff
==============================================================================
--- qpid/java/trunk/common/src/test/java/org/apache/qpid/codec/AMQDecoderTest.java (original)
+++ qpid/java/trunk/common/src/test/java/org/apache/qpid/codec/AMQDecoderTest.java Fri Nov 18 09:27:01 2016
@@ -53,8 +53,9 @@ public class AMQDecoderTest extends Qpid
     private FrameCreatingMethodProcessor _methodProcessor;
 
 
-    public void setUp()
+    public void setUp() throws Exception
     {
+        super.setUp();
         _methodProcessor = new FrameCreatingMethodProcessor(ProtocolVersion.v0_91);
         _decoder = new ClientDecoder(_methodProcessor);
     }

Modified: qpid/java/trunk/common/src/test/java/org/apache/qpid/framing/BasicContentHeaderPropertiesTest.java
URL: http://svn.apache.org/viewvc/qpid/java/trunk/common/src/test/java/org/apache/qpid/framing/BasicContentHeaderPropertiesTest.java?rev=1770346&r1=1770345&r2=1770346&view=diff
==============================================================================
--- qpid/java/trunk/common/src/test/java/org/apache/qpid/framing/BasicContentHeaderPropertiesTest.java (original)
+++ qpid/java/trunk/common/src/test/java/org/apache/qpid/framing/BasicContentHeaderPropertiesTest.java Fri Nov 18 09:27:01 2016
@@ -40,8 +40,9 @@ public class BasicContentHeaderPropertie
         _testProperties = new BasicContentHeaderProperties();
     }
 
-    public void setUp()
+    public void setUp() throws Exception
     {
+        super.setUp();
         _testTable = new FieldTable();
         _testTable.setString("TestString", _testString);
         _testTable.setInteger("Testint", _testint);

Modified: qpid/java/trunk/common/src/test/java/org/apache/qpid/framing/abstraction/MessagePublishInfoImplTest.java
URL: http://svn.apache.org/viewvc/qpid/java/trunk/common/src/test/java/org/apache/qpid/framing/abstraction/MessagePublishInfoImplTest.java?rev=1770346&r1=1770345&r2=1770346&view=diff
==============================================================================
--- qpid/java/trunk/common/src/test/java/org/apache/qpid/framing/abstraction/MessagePublishInfoImplTest.java (original)
+++ qpid/java/trunk/common/src/test/java/org/apache/qpid/framing/abstraction/MessagePublishInfoImplTest.java Fri Nov 18 09:27:01 2016
@@ -30,8 +30,9 @@ public class MessagePublishInfoImplTest
     private final AMQShortString _exchange = new AMQShortString("exchange");
     private final AMQShortString _routingKey = new AMQShortString("routingKey");
 
-    public void setUp()
+    public void setUp() throws Exception
     {
+        super.setUp();
         _mpi = new MessagePublishInfo(_exchange, true, true, _routingKey);
     }
 

Modified: qpid/java/trunk/common/src/test/java/org/apache/qpid/util/ByteBufferInputStreamTest.java
URL: http://svn.apache.org/viewvc/qpid/java/trunk/common/src/test/java/org/apache/qpid/util/ByteBufferInputStreamTest.java?rev=1770346&r1=1770345&r2=1770346&view=diff
==============================================================================
--- qpid/java/trunk/common/src/test/java/org/apache/qpid/util/ByteBufferInputStreamTest.java (original)
+++ qpid/java/trunk/common/src/test/java/org/apache/qpid/util/ByteBufferInputStreamTest.java Fri Nov 18 09:27:01 2016
@@ -33,6 +33,7 @@ public class ByteBufferInputStreamTest e
 
     public void setUp() throws Exception
     {
+        super.setUp();
         _inputStream = new ByteBufferInputStream(ByteBuffer.wrap(_data));
     }
 

Modified: qpid/java/trunk/perftests/src/test/java/org/apache/qpid/disttest/ConfigFileHelperTest.java
URL: http://svn.apache.org/viewvc/qpid/java/trunk/perftests/src/test/java/org/apache/qpid/disttest/ConfigFileHelperTest.java?rev=1770346&r1=1770345&r2=1770346&view=diff
==============================================================================
--- qpid/java/trunk/perftests/src/test/java/org/apache/qpid/disttest/ConfigFileHelperTest.java (original)
+++ qpid/java/trunk/perftests/src/test/java/org/apache/qpid/disttest/ConfigFileHelperTest.java Fri Nov 18 09:27:01 2016
@@ -36,6 +36,7 @@ public class ConfigFileHelperTest extend
     @Override
     protected void setUp() throws Exception
     {
+        super.setUp();
         _testDir = TestFileUtils.createTestDirectory();
     }
 

Modified: qpid/java/trunk/perftests/src/test/java/org/apache/qpid/disttest/controller/config/ConfigReaderTest.java
URL: http://svn.apache.org/viewvc/qpid/java/trunk/perftests/src/test/java/org/apache/qpid/disttest/controller/config/ConfigReaderTest.java?rev=1770346&r1=1770345&r2=1770346&view=diff
==============================================================================
--- qpid/java/trunk/perftests/src/test/java/org/apache/qpid/disttest/controller/config/ConfigReaderTest.java (original)
+++ qpid/java/trunk/perftests/src/test/java/org/apache/qpid/disttest/controller/config/ConfigReaderTest.java Fri Nov 18 09:27:01 2016
@@ -35,6 +35,7 @@ public class ConfigReaderTest extends Qp
     @Override
     protected void setUp() throws Exception
     {
+        super.setUp();
         ConfigReader configReader = new ConfigReader();
         Reader reader = ConfigFileTestHelper.getConfigFileReader(getClass(), "sampleConfig.json");
         _config = configReader.readConfig(reader);

Modified: qpid/java/trunk/perftests/src/test/java/org/apache/qpid/disttest/results/ResultsCsvWriterTest.java
URL: http://svn.apache.org/viewvc/qpid/java/trunk/perftests/src/test/java/org/apache/qpid/disttest/results/ResultsCsvWriterTest.java?rev=1770346&r1=1770345&r2=1770346&view=diff
==============================================================================
--- qpid/java/trunk/perftests/src/test/java/org/apache/qpid/disttest/results/ResultsCsvWriterTest.java (original)
+++ qpid/java/trunk/perftests/src/test/java/org/apache/qpid/disttest/results/ResultsCsvWriterTest.java Fri Nov 18 09:27:01 2016
@@ -42,8 +42,9 @@ public class ResultsCsvWriterTest extend
     private ResultsCsvWriter _resultsFileWriter = new ResultsCsvWriter(_outputDir);
 
     @Override
-    public void setUp()
+    public void setUp() throws Exception
     {
+        super.setUp();
         _resultsFileWriter.setCsvFormater(_csvFormater);
     }
 

Modified: qpid/java/trunk/perftests/visualisation-jfc/src/test/java/org/apache/qpid/disttest/charting/writer/ChartWriterTest.java
URL: http://svn.apache.org/viewvc/qpid/java/trunk/perftests/visualisation-jfc/src/test/java/org/apache/qpid/disttest/charting/writer/ChartWriterTest.java?rev=1770346&r1=1770345&r2=1770346&view=diff
==============================================================================
--- qpid/java/trunk/perftests/visualisation-jfc/src/test/java/org/apache/qpid/disttest/charting/writer/ChartWriterTest.java (original)
+++ qpid/java/trunk/perftests/visualisation-jfc/src/test/java/org/apache/qpid/disttest/charting/writer/ChartWriterTest.java Fri Nov 18 09:27:01 2016
@@ -45,8 +45,9 @@ public class ChartWriterTest extends Qpi
     private ChartWriter _writer;
 
     @Override
-    public void setUp()
+    public void setUp() throws Exception
     {
+        super.setUp();
         DefaultPieDataset dataset = new DefaultPieDataset();
         dataset.setValue("a", 1);
         dataset.setValue("b", 2);

Modified: qpid/java/trunk/systests/src/test/java/org/apache/qpid/client/TemporaryQueuePrefixTest.java
URL: http://svn.apache.org/viewvc/qpid/java/trunk/systests/src/test/java/org/apache/qpid/client/TemporaryQueuePrefixTest.java?rev=1770346&r1=1770345&r2=1770346&view=diff
==============================================================================
--- qpid/java/trunk/systests/src/test/java/org/apache/qpid/client/TemporaryQueuePrefixTest.java (original)
+++ qpid/java/trunk/systests/src/test/java/org/apache/qpid/client/TemporaryQueuePrefixTest.java Fri Nov 18 09:27:01 2016
@@ -29,14 +29,14 @@ import javax.jms.TemporaryQueue;
 public class TemporaryQueuePrefixTest extends QpidBrokerTestCase
 {
     @Override
-    public void setUp() throws Exception
+    public void startDefaultBroker() throws Exception
     {
-        // deliberately don't call setup
+        // deliberately don't start broker
     }
 
     public void testNoPrefixSet() throws Exception
     {
-        super.setUp();
+        super.startDefaultBroker();
         Connection connection = getConnection();
         Session session = connection.createSession(false, Session.AUTO_ACKNOWLEDGE);
         TemporaryQueue queue = session.createTemporaryQueue();
@@ -49,7 +49,7 @@ public class TemporaryQueuePrefixTest ex
     {
         String prefix = "[]";
         setTestSystemProperty("qpid.globalAddressDomains", prefix);
-        super.setUp();
+        super.startDefaultBroker();
         Connection connection = getConnection();
         Session session = connection.createSession(false, Session.AUTO_ACKNOWLEDGE);
         TemporaryQueue queue = session.createTemporaryQueue();
@@ -63,7 +63,7 @@ public class TemporaryQueuePrefixTest ex
         final String primaryPrefix = "/testPrefix";
         String prefix = "[ \\\"" + primaryPrefix + "\\\", \\\"/foo\\\" ]";
         setTestSystemProperty("qpid.globalAddressDomains", prefix);
-        super.setUp();
+        super.startDefaultBroker();
         Connection connection = getConnection();
         Session session = connection.createSession(false, Session.AUTO_ACKNOWLEDGE);
         TemporaryQueue queue = session.createTemporaryQueue();
@@ -77,7 +77,7 @@ public class TemporaryQueuePrefixTest ex
     {
         String prefix = "/testPrefix";
         setTestSystemProperty("qpid.globalAddressDomains", prefix);
-        super.setUp();
+        super.startDefaultBroker();
         Connection connection = getConnection();
         Session session = connection.createSession(false, Session.AUTO_ACKNOWLEDGE);
         TemporaryQueue queue = session.createTemporaryQueue();

Modified: qpid/java/trunk/systests/src/test/java/org/apache/qpid/server/SupportedProtocolVersionsTest.java
URL: http://svn.apache.org/viewvc/qpid/java/trunk/systests/src/test/java/org/apache/qpid/server/SupportedProtocolVersionsTest.java?rev=1770346&r1=1770345&r2=1770346&view=diff
==============================================================================
--- qpid/java/trunk/systests/src/test/java/org/apache/qpid/server/SupportedProtocolVersionsTest.java (original)
+++ qpid/java/trunk/systests/src/test/java/org/apache/qpid/server/SupportedProtocolVersionsTest.java Fri Nov 18 09:27:01 2016
@@ -45,9 +45,9 @@ import org.apache.qpid.test.utils.QpidBr
  */
 public class SupportedProtocolVersionsTest extends QpidBrokerTestCase
 {
-    public void setUp() throws Exception
+    public void startDefaultBroker() throws Exception
     {
-        // No-op, we call super.setUp() from test methods after appropriate config overrides
+        // No-op, we call super.startDefaultBroker() from test methods after appropriate config overrides
     }
 
     private void clearProtocolSupportManipulations() throws Exception
@@ -96,7 +96,7 @@ public class SupportedProtocolVersionsTe
     {
         clearProtocolSupportManipulations();
 
-        super.setUp();
+        super.startDefaultBroker();
 
         //Verify requesting a 0-10 connection works
         setTestClientSystemProperty(ClientProperties.AMQP_VERSION, "0-10");
@@ -127,7 +127,7 @@ public class SupportedProtocolVersionsTe
     {
         setSystemProperty(QpidBrokerTestCase.TEST_AMQP_PORT_PROTOCOLS_PROPERTY, getProtocolsWithExclusions(Protocol.AMQP_1_0, Protocol.AMQP_0_10));
 
-        super.setUp();
+        super.startDefaultBroker();
 
         //Verify initially requesting a 0-10 connection now negotiates a 0-91
         //connection as the broker should reply with its highest supported protocol
@@ -146,7 +146,7 @@ public class SupportedProtocolVersionsTe
 
         setSystemProperty(AmqpPort.PROPERTY_DEFAULT_SUPPORTED_PROTOCOL_REPLY, "v0_9");
 
-        super.setUp();
+        super.startDefaultBroker();
 
         //Verify initially requesting a 0-10 connection now negotiates a 0-9 connection as the
         //broker should reply with its 'default unsupported protocol initiation reply' as opposed
@@ -165,7 +165,7 @@ public class SupportedProtocolVersionsTe
 
     public void testProtocolIsExpectedBasedOnTestProfile() throws Exception
     {
-        super.setUp();
+        super.startDefaultBroker();
         final AMQConnection connection = (AMQConnection) getConnection();
         final Protocol expectedBrokerProtocol = getBrokerProtocol();
         final AMQPProtocolVersionWrapper amqpProtocolVersionWrapper = new AMQPProtocolVersionWrapper(expectedBrokerProtocol);

Modified: qpid/java/trunk/systests/src/test/java/org/apache/qpid/systest/messageencryption/MessageEncryptionTest.java
URL: http://svn.apache.org/viewvc/qpid/java/trunk/systests/src/test/java/org/apache/qpid/systest/messageencryption/MessageEncryptionTest.java?rev=1770346&r1=1770345&r2=1770346&view=diff
==============================================================================
--- qpid/java/trunk/systests/src/test/java/org/apache/qpid/systest/messageencryption/MessageEncryptionTest.java (original)
+++ qpid/java/trunk/systests/src/test/java/org/apache/qpid/systest/messageencryption/MessageEncryptionTest.java Fri Nov 18 09:27:01 2016
@@ -50,16 +50,16 @@ public class MessageEncryptionTest exten
     public static final String INCLUDED_VIRTUAL_HOST_NODE_NAME = "includedVirtualHostNode";
 
     @Override
-    public void setUp() throws Exception
+    public void startDefaultBroker() throws Exception
     {
-
+        // tests start broker
     }
 
     public void testEncryptionUsingMessageHeader() throws Exception
     {
         if(isStrongEncryptionEnabled() && !isCppBroker())
         {
-            super.setUp();
+            super.startDefaultBroker();
             Map<String, String> prodConnOptions = new HashMap<>();
             prodConnOptions.put("encryption_trust_store", BROKER_PEERSTORE);
             prodConnOptions.put("encryption_trust_store_password", BROKER_PEERSTORE_PASSWORD);
@@ -100,7 +100,7 @@ public class MessageEncryptionTest exten
     {
         if(isStrongEncryptionEnabled() && !isCppBroker())
         {
-            super.setUp();
+            super.startDefaultBroker();
             Map<String, String> prodConnOptions = new HashMap<>();
             prodConnOptions.put("encryption_trust_store", BROKER_PEERSTORE);
             prodConnOptions.put("encryption_trust_store_password", BROKER_PEERSTORE_PASSWORD);
@@ -138,7 +138,7 @@ public class MessageEncryptionTest exten
     {
         if(isStrongEncryptionEnabled() && !isCppBroker())
         {
-            super.setUp();
+            super.startDefaultBroker();
             Map<String, String> prodConnOptions = new HashMap<>();
             prodConnOptions.put("encryption_trust_store", BROKER_PEERSTORE);
             prodConnOptions.put("encryption_trust_store_password", BROKER_PEERSTORE_PASSWORD);
@@ -182,7 +182,7 @@ public class MessageEncryptionTest exten
         if(isStrongEncryptionEnabled() && !isCppBroker())
         {
             addPeerStoreToBroker();
-            super.setUp();
+            super.startDefaultBroker();
             Map<String, String> prodConnOptions = new HashMap<>();
             prodConnOptions.put("encryption_remote_trust_store","$certificates%5c/peerstore");
             Connection producerConnection = getConnectionWithOptions(prodConnOptions);
@@ -225,7 +225,7 @@ public class MessageEncryptionTest exten
             createTestVirtualHostNode(EXCLUDED_VIRTUAL_HOST_NODE_NAME);
             addPeerStoreToBroker(Collections.<String, Object>singletonMap("excludedVirtualHostNodeMessageSources",
                                                                           EXCLUDED_VIRTUAL_HOST_NODE_NAME));
-            super.setUp();
+            super.startDefaultBroker();
 
             String connectionUrlString = "amqp://guest:guest@clientId/" + EXCLUDED_VIRTUAL_HOST_NODE_NAME
                                          + "?brokerlist='tcp://localhost:" + getDefaultAmqpPort() + "'"
@@ -264,7 +264,7 @@ public class MessageEncryptionTest exten
             // this is deliberate to test that the include list takes precedence
             additionalPeerStoreAttributes.put("excludedVirtualHostNodeMessageSources", INCLUDED_VIRTUAL_HOST_NODE_NAME);
             addPeerStoreToBroker(additionalPeerStoreAttributes);
-            super.setUp();
+            super.startDefaultBroker();
 
             String connectionUrlString;
 
@@ -308,7 +308,7 @@ public class MessageEncryptionTest exten
         if(isStrongEncryptionEnabled() && !isCppBroker())
         {
             addPeerStoreToBroker();
-            super.setUp();
+            super.startDefaultBroker();
             Map<String, String> prodConnOptions = new HashMap<>();
             prodConnOptions.put("encryption_remote_trust_store","$certificates%5c/peerstore");
             Connection producerConnection = getConnectionWithOptions(prodConnOptions);
@@ -351,7 +351,7 @@ public class MessageEncryptionTest exten
     {
         if(isStrongEncryptionEnabled() && !isCppBroker())
         {
-            super.setUp();
+            super.startDefaultBroker();
             Map<String, String> prodConnOptions = new HashMap<>();
             prodConnOptions.put("encryption_trust_store", BROKER_PEERSTORE);
             prodConnOptions.put("encryption_trust_store_password", BROKER_PEERSTORE_PASSWORD);

Modified: qpid/java/trunk/systests/src/test/java/org/apache/qpid/systest/rest/CompressedResponsesRestTest.java
URL: http://svn.apache.org/viewvc/qpid/java/trunk/systests/src/test/java/org/apache/qpid/systest/rest/CompressedResponsesRestTest.java?rev=1770346&r1=1770345&r2=1770346&view=diff
==============================================================================
--- qpid/java/trunk/systests/src/test/java/org/apache/qpid/systest/rest/CompressedResponsesRestTest.java (original)
+++ qpid/java/trunk/systests/src/test/java/org/apache/qpid/systest/rest/CompressedResponsesRestTest.java Fri Nov 18 09:27:01 2016
@@ -36,22 +36,16 @@ import org.apache.qpid.test.utils.TestBr
 
 public class CompressedResponsesRestTest extends QpidRestTestCase
 {
-
-    private boolean _compress;
-
     @Override
-    public void setUp() throws Exception
+    public void startDefaultBroker() throws Exception
     {
+        // noop
     }
 
     @Override
     protected void customizeConfiguration() throws Exception
     {
-        super.customizeConfiguration();
-        getDefaultBrokerConfiguration().setObjectAttribute(Plugin.class,
-                                                           TestBrokerConfiguration.ENTRY_NAME_HTTP_MANAGEMENT,
-                                                           "compressResponses",
-                                                           _compress);
+        // noop
     }
 
     public void testCompressionOffAcceptOff() throws Exception
@@ -79,8 +73,12 @@ public class CompressedResponsesRestTest
                                    final boolean acceptCompressed) throws Exception
     {
         final boolean expectCompression = allowCompression && acceptCompressed;
-        _compress = allowCompression;
-        super.setUp();
+        super.customizeConfiguration();
+        getDefaultBrokerConfiguration().setObjectAttribute(Plugin.class,
+                                                           TestBrokerConfiguration.ENTRY_NAME_HTTP_MANAGEMENT,
+                                                           "compressResponses",
+                                                           expectCompression);
+        super.startDefaultBroker();
 
         HttpURLConnection conn = getRestTestHelper().openManagementConnection("/service/metadata", "GET");
         if(acceptCompressed)

Modified: qpid/java/trunk/systests/src/test/java/org/apache/qpid/systest/rest/KeyStoreRestTest.java
URL: http://svn.apache.org/viewvc/qpid/java/trunk/systests/src/test/java/org/apache/qpid/systest/rest/KeyStoreRestTest.java?rev=1770346&r1=1770345&r2=1770346&view=diff
==============================================================================
--- qpid/java/trunk/systests/src/test/java/org/apache/qpid/systest/rest/KeyStoreRestTest.java (original)
+++ qpid/java/trunk/systests/src/test/java/org/apache/qpid/systest/rest/KeyStoreRestTest.java Fri Nov 18 09:27:01 2016
@@ -38,17 +38,9 @@ import org.apache.qpid.util.FileUtils;
 
 public class KeyStoreRestTest extends QpidRestTestCase
 {
-    @Override
-    public void setUp() throws Exception
-    {
-        // not calling super.setUp() to avoid broker start-up until
-        // after any necessary configuration
-    }
 
     public void testGet() throws Exception
     {
-        super.setUp();
-
         //verify existence of the default keystore used by the systests
         List<Map<String, Object>> keyStores = assertNumberOfKeyStores(1);
 
@@ -63,8 +55,6 @@ public class KeyStoreRestTest extends Qp
 
     public void testCreate() throws Exception
     {
-        super.setUp();
-
         String name = getTestName();
         String certAlias = "app2";
 
@@ -84,8 +74,6 @@ public class KeyStoreRestTest extends Qp
 
     public void testCreateWithDataUrl() throws Exception
     {
-        super.setUp();
-
         String name = getTestName();
         byte[] keystoreAsBytes = FileUtils.readFileAsBytes(TestSSLConstants.KEYSTORE);
         String dataUrlForKeyStore = DataUrlUtils.getDataUrlForBytes(keystoreAsBytes);
@@ -106,8 +94,6 @@ public class KeyStoreRestTest extends Qp
 
     public void testDelete() throws Exception
     {
-        super.setUp();
-
         String name = getTestName();
         String certAlias = "app2";
 
@@ -129,8 +115,6 @@ public class KeyStoreRestTest extends Qp
 
     public void testUpdate() throws Exception
     {
-        super.setUp();
-
         String name = getTestName();
 
         assertNumberOfKeyStores(1);

Modified: qpid/java/trunk/systests/src/test/java/org/apache/qpid/systest/rest/TrustStoreRestTest.java
URL: http://svn.apache.org/viewvc/qpid/java/trunk/systests/src/test/java/org/apache/qpid/systest/rest/TrustStoreRestTest.java?rev=1770346&r1=1770345&r2=1770346&view=diff
==============================================================================
--- qpid/java/trunk/systests/src/test/java/org/apache/qpid/systest/rest/TrustStoreRestTest.java (original)
+++ qpid/java/trunk/systests/src/test/java/org/apache/qpid/systest/rest/TrustStoreRestTest.java Fri Nov 18 09:27:01 2016
@@ -38,17 +38,8 @@ import org.apache.qpid.util.FileUtils;
 public class TrustStoreRestTest extends QpidRestTestCase
 {
 
-    @Override
-    public void setUp() throws Exception
-    {
-        // not calling super.setUp() to avoid broker start-up until
-        // after any necessary configuration
-    }
-
     public void testGet() throws Exception
     {
-        super.setUp();
-
         //verify existence of the default trust store used by the systests
         List<Map<String, Object>> trustStores = assertNumberOfTrustStores(1);
 
@@ -65,8 +56,6 @@ public class TrustStoreRestTest extends
 
     public void testCreate() throws Exception
     {
-        super.setUp();
-
         String name = getTestName();
 
         assertNumberOfTrustStores(1);
@@ -86,8 +75,6 @@ public class TrustStoreRestTest extends
 
     public void testCreateUsingDataUrl() throws Exception
     {
-        super.setUp();
-
         String name = getTestName();
         byte[] trustStoreAsBytes = FileUtils.readFileAsBytes(TestSSLConstants.TRUSTSTORE);
         String dataUrlForTruststore = DataUrlUtils.getDataUrlForBytes(trustStoreAsBytes);
@@ -111,8 +98,6 @@ public class TrustStoreRestTest extends
 
     public void testDelete() throws Exception
     {
-        super.setUp();
-
         String name = getTestName();
 
         assertNumberOfTrustStores(1);
@@ -135,8 +120,6 @@ public class TrustStoreRestTest extends
 
     public void testUpdate() throws Exception
     {
-        super.setUp();
-
         String name = getTestName();
 
         assertNumberOfTrustStores(1);

Modified: qpid/java/trunk/systests/src/test/java/org/apache/qpid/systest/rest/acl/GroupRestACLTest.java
URL: http://svn.apache.org/viewvc/qpid/java/trunk/systests/src/test/java/org/apache/qpid/systest/rest/acl/GroupRestACLTest.java?rev=1770346&r1=1770345&r2=1770346&view=diff
==============================================================================
--- qpid/java/trunk/systests/src/test/java/org/apache/qpid/systest/rest/acl/GroupRestACLTest.java (original)
+++ qpid/java/trunk/systests/src/test/java/org/apache/qpid/systest/rest/acl/GroupRestACLTest.java Fri Nov 18 09:27:01 2016
@@ -49,12 +49,9 @@ public class GroupRestACLTest extends Qp
     private File _groupFile;
 
     @Override
-    public void setUp() throws Exception
+    public void startDefaultBroker() throws Exception
     {
-        _groupFile = createTemporaryGroupFile();
-        getDefaultBrokerConfiguration().addGroupFileConfiguration(_groupFile.getAbsolutePath());
-
-        //DONT call super.setUp(), the tests will start the broker after configuring it
+        // tests will start the broker after configuring it
     }
 
     @Override
@@ -62,6 +59,8 @@ public class GroupRestACLTest extends Qp
     {
         super.customizeConfiguration();
         getDefaultBrokerConfiguration().setObjectAttribute(Plugin.class, TestBrokerConfiguration.ENTRY_NAME_HTTP_MANAGEMENT, HttpManagement.HTTP_BASIC_AUTHENTICATION_ENABLED, true);
+        _groupFile = createTemporaryGroupFile();
+        getDefaultBrokerConfiguration().addGroupFileConfiguration(_groupFile.getAbsolutePath());
     }
 
     @Override
@@ -103,7 +102,7 @@ public class GroupRestACLTest extends Qp
                 "ACL DENY-LOG " + DENIED_GROUP + " CREATE GROUP");
 
         //Start the broker with the custom config
-        super.setUp();
+        super.startDefaultBroker();
         getRestTestHelper().setUsernameAndPassword(ALLOWED_USER, ALLOWED_USER);
 
         Map<String, Object> data = getRestTestHelper().getJsonAsSingletonList("groupprovider/" + FILE_GROUP_MANAGER);
@@ -129,7 +128,7 @@ public class GroupRestACLTest extends Qp
                 "ACL DENY-LOG " + DENIED_GROUP + " DELETE GROUP");
 
         //Start the broker with the custom config
-        super.setUp();
+        super.startDefaultBroker();
         getRestTestHelper().setUsernameAndPassword(DENIED_USER, DENIED_USER);
 
         Map<String, Object> data = getRestTestHelper().getJsonAsSingletonList("groupprovider/" + FILE_GROUP_MANAGER);
@@ -155,7 +154,7 @@ public class GroupRestACLTest extends Qp
                 "ACL DENY-LOG " + DENIED_GROUP + " UPDATE GROUP");
 
         //Start the broker with the custom config
-        super.setUp();
+        super.startDefaultBroker();
         getRestTestHelper().setUsernameAndPassword(DENIED_USER, DENIED_USER);
 
         assertNumberOfGroupMembers(OTHER_GROUP, 1);
@@ -175,7 +174,7 @@ public class GroupRestACLTest extends Qp
                 "ACL DENY-LOG " + DENIED_GROUP + " UPDATE GROUP");
 
         //Start the broker with the custom config
-        super.setUp();
+        super.startDefaultBroker();
         getRestTestHelper().setUsernameAndPassword(DENIED_USER, DENIED_USER);
 
         assertNumberOfGroupMembers(OTHER_GROUP, 1);

Modified: qpid/java/trunk/systests/src/test/java/org/apache/qpid/test/utils/BrokerCommandHelperTest.java
URL: http://svn.apache.org/viewvc/qpid/java/trunk/systests/src/test/java/org/apache/qpid/test/utils/BrokerCommandHelperTest.java?rev=1770346&r1=1770345&r2=1770346&view=diff
==============================================================================
--- qpid/java/trunk/systests/src/test/java/org/apache/qpid/test/utils/BrokerCommandHelperTest.java (original)
+++ qpid/java/trunk/systests/src/test/java/org/apache/qpid/test/utils/BrokerCommandHelperTest.java Fri Nov 18 09:27:01 2016
@@ -33,8 +33,9 @@ public class BrokerCommandHelperTest ext
     private BrokerCommandHelper _brokerCommandHelper;
 
     @Override
-    public void setUp()
+    public void setUp() throws Exception
     {
+        super.setUp();
         _brokerCommandHelper = new BrokerCommandHelper("\"" + PATH_TO_QPID_EXECUTABLE + "\" " + ARGUMENT_PORT + "     "
                 + ARGUMENT_PORT_VALUE + " " + ARGUMENT_STORE_PATH + " " + ARGUMENT_STORE_PATH_VALUE + " " + ARGUMENT_STORE_TYPE
                 + " " + ARGUMENT_STORE_TYPE_VALUE + "     '" + ARGUMENT_WITH_SPACES

Modified: qpid/java/trunk/systests/src/test/java/org/apache/qpid/transport/MaxFrameSizeTest.java
URL: http://svn.apache.org/viewvc/qpid/java/trunk/systests/src/test/java/org/apache/qpid/transport/MaxFrameSizeTest.java?rev=1770346&r1=1770345&r2=1770346&view=diff
==============================================================================
--- qpid/java/trunk/systests/src/test/java/org/apache/qpid/transport/MaxFrameSizeTest.java (original)
+++ qpid/java/trunk/systests/src/test/java/org/apache/qpid/transport/MaxFrameSizeTest.java Fri Nov 18 09:27:01 2016
@@ -69,10 +69,9 @@ public class MaxFrameSizeTest extends Qp
 {
 
     @Override
-    public void setUp() throws Exception
+    public void startDefaultBroker() throws Exception
     {
-        // don't call super.setup() as we want a change to set stuff up before the broker starts
-        // super.setUp();
+        // broker started by the tests
     }
 
     public void testTooSmallFrameSize() throws Exception
@@ -82,7 +81,7 @@ public class MaxFrameSizeTest extends Qp
                                                            TestBrokerConfiguration.ENTRY_NAME_AUTHENTICATION_PROVIDER,
                                                            "secureOnlyMechanisms",
                                                            "[]");
-        super.setUp();
+        super.startDefaultBroker();
 
         if(isBroker010())
         {
@@ -154,7 +153,7 @@ public class MaxFrameSizeTest extends Qp
                                                            "secureOnlyMechanisms",
                                                            "[]");
 
-        super.setUp();
+        super.startDefaultBroker();
         if(isBroker010())
         {
             Connection conn = new Connection();




---------------------------------------------------------------------
To unsubscribe, e-mail: commits-unsubscribe@qpid.apache.org
For additional commands, e-mail: commits-help@qpid.apache.org