summaryrefslogtreecommitdiff
path: root/java/systests/src/main/java/org/apache/qpid/server/security/acl/AbstractACLTestCase.java
diff options
context:
space:
mode:
Diffstat (limited to 'java/systests/src/main/java/org/apache/qpid/server/security/acl/AbstractACLTestCase.java')
-rw-r--r--java/systests/src/main/java/org/apache/qpid/server/security/acl/AbstractACLTestCase.java23
1 files changed, 5 insertions, 18 deletions
diff --git a/java/systests/src/main/java/org/apache/qpid/server/security/acl/AbstractACLTestCase.java b/java/systests/src/main/java/org/apache/qpid/server/security/acl/AbstractACLTestCase.java
index 8ccf74a22b..814936f342 100644
--- a/java/systests/src/main/java/org/apache/qpid/server/security/acl/AbstractACLTestCase.java
+++ b/java/systests/src/main/java/org/apache/qpid/server/security/acl/AbstractACLTestCase.java
@@ -26,6 +26,7 @@ import org.apache.qpid.client.AMQConnection;
import org.apache.qpid.client.AMQConnectionURL;
import org.apache.qpid.jms.ConnectionListener;
import org.apache.qpid.protocol.AMQConstant;
+import org.apache.qpid.server.model.Broker;
import org.apache.qpid.test.utils.QpidBrokerTestCase;
import org.apache.qpid.url.URLSyntaxException;
@@ -45,7 +46,7 @@ import java.util.concurrent.TimeUnit;
/**
* Abstract test case for ACLs.
*
- * This base class contains convenience methods to mange ACL files and implements a mechanism that allows each
+ * This base class contains convenience methods to manage ACL files and implements a mechanism that allows each
* test method to run its own setup code before the broker starts.
*
* TODO move the pre broker-startup setup method invocation code to {@link QpidBrokerTestCase}
@@ -58,25 +59,11 @@ public abstract class AbstractACLTestCase extends QpidBrokerTestCase implements
{
/** Used to synchronise {@link #tearDown()} when exceptions are thrown */
protected CountDownLatch _exceptionReceived;
-
- /** Override this to return the name of the configuration XML file. */
- public String getConfig()
- {
- return "config-systests.xml";
- }
- /**
- * This setup method checks {@link #getConfig()} and {@link #getHostList()} to initialise the broker with specific
- * ACL configurations and then runs an optional per-test setup method, which is simply a method with the same name
- * as the test, but starting with {@code setUp} rather than {@code test}.
- *
- * @see org.apache.qpid.test.utils.QpidBrokerTestCase#setUp()
- */
@Override
public void setUp() throws Exception
{
- // Initialise ACLs.
- _configFile = new File("build" + File.separator + "etc" + File.separator + getConfig());
+ getBrokerConfiguration().setBrokerAttribute(Broker.GROUP_FILE, System.getProperty(QPID_HOME) + "/etc/groups-systests");
// run test specific setup
String testSetup = StringUtils.replace(getName(), "test", "setUp");
@@ -123,11 +110,11 @@ public abstract class AbstractACLTestCase extends QpidBrokerTestCase implements
if (vhost == null)
{
- testcase.setConfigurationProperty("security.acl", aclFile.getAbsolutePath());
+ testcase.getBrokerConfiguration().setBrokerAttribute(Broker.ACL_FILE, aclFile.getAbsolutePath());
}
else
{
- testcase.setConfigurationProperty("virtualhosts.virtualhost." + vhost + ".security.acl", aclFile.getAbsolutePath());
+ testcase.setVirtualHostConfigurationProperty("virtualhosts.virtualhost." + vhost + ".security.acl", aclFile.getAbsolutePath());
}
PrintWriter out = new PrintWriter(new FileWriter(aclFile));