From d1314664ed6077524dd4ce23d1dcd46eb45b0e6b Mon Sep 17 00:00:00 2001 From: Martin Ritchie Date: Wed, 2 Jun 2010 16:42:54 +0000 Subject: QPID-2632 - Cleaned up PluginTest, it now simply uses the configure() method to set its additional property git-svn-id: https://svn.apache.org/repos/asf/qpid/trunk@950641 13f79535-47bb-0310-9956-ffa450edef68 --- .../org/apache/qpid/server/plugins/PluginTest.java | 23 +++++----------------- 1 file changed, 5 insertions(+), 18 deletions(-) (limited to 'qpid/java') diff --git a/qpid/java/broker/src/test/java/org/apache/qpid/server/plugins/PluginTest.java b/qpid/java/broker/src/test/java/org/apache/qpid/server/plugins/PluginTest.java index 325a4e6464..1ba03a2165 100644 --- a/qpid/java/broker/src/test/java/org/apache/qpid/server/plugins/PluginTest.java +++ b/qpid/java/broker/src/test/java/org/apache/qpid/server/plugins/PluginTest.java @@ -24,36 +24,23 @@ import org.apache.qpid.server.configuration.ServerConfiguration; import org.apache.qpid.server.exchange.ExchangeType; import org.apache.qpid.server.registry.ApplicationRegistry; import org.apache.qpid.server.registry.IApplicationRegistry; +import org.apache.qpid.server.util.InternalBrokerBaseCase; import org.apache.qpid.server.util.TestApplicationRegistry; import java.util.Map; -public class PluginTest extends TestCase +public class PluginTest extends InternalBrokerBaseCase { private static final String TEST_EXCHANGE_CLASS = "org.apache.qpid.extras.exchanges.example.TestExchangeType"; private static final String PLUGIN_DIRECTORY = System.getProperty("example.plugin.target"); private static final String CACHE_DIRECTORY = System.getProperty("example.cache.target"); - IApplicationRegistry _registry; - - @Override - public void setUp() throws Exception - { - PropertiesConfiguration properties = new PropertiesConfiguration(); - properties.addProperty("plugin-directory", PLUGIN_DIRECTORY); - properties.addProperty("cache-directory", CACHE_DIRECTORY); - ServerConfiguration config = new ServerConfiguration(properties); - - // This Test requries an application Registry - ApplicationRegistry.initialise(new TestApplicationRegistry(config)); - _registry = ApplicationRegistry.getInstance(); - } - @Override - public void tearDown() throws Exception + public void configure() { - ApplicationRegistry.remove(); + _configuration.getConfig().addProperty("plugin-directory", PLUGIN_DIRECTORY); + _configuration.getConfig().addProperty("cache-directory", CACHE_DIRECTORY); } public void disabled_testLoadExchanges() throws Exception -- cgit v1.2.1