git-svn-id: https://svn.apache.org/repos/asf/activemq/trunk@1349719 13f79535-47bb-0310-9956-ffa450edef68
This commit is contained in:
Bosanac Dejan 2012-06-13 10:13:09 +00:00
parent b067a65444
commit 9bf65b4f09
2 changed files with 7 additions and 4 deletions

View File

@ -136,7 +136,6 @@ public class CachedLDAPAuthorizationMap extends DefaultAuthorizationMap implemen
try {
context = createContext();
if (refreshInterval == -1 && !refreshDisabled) {
eventContext = ((EventDirContext)context.lookup(""));

View File

@ -286,12 +286,12 @@ public abstract class AbstractCachedLDAPAuthorizationMapLegacyTest extends Abstr
testRestart(true);
}
public void testRestart(boolean sync) throws Exception {
map.query();
public void testRestart(final boolean sync) throws Exception {
if (sync) {
// ldap connection can be slow to close
map.setRefreshInterval(1000);
}
map.query();
Set<?> failedACLs = map.getReadACLs(new ActiveMQQueue("FAILED"));
assertEquals("set size: " + failedACLs, 0, failedACLs.size());
@ -305,8 +305,12 @@ public abstract class AbstractCachedLDAPAuthorizationMapLegacyTest extends Abstr
// as we can't rely on ldar server isStarted()
Wait.waitFor(new Wait.Condition() {
public boolean isSatisified() throws Exception {
if (sync) {
return !map.isContextAlive();
} else {
return map.context == null;
}
}
});
failedACLs = map.getReadACLs(new ActiveMQQueue("TEST.FOO"));