mirror of https://github.com/apache/activemq.git
https://issues.apache.org/jira/browse/AMQ-3845 - sync test case is now fixed as well
git-svn-id: https://svn.apache.org/repos/asf/activemq/trunk@1349719 13f79535-47bb-0310-9956-ffa450edef68
This commit is contained in:
parent
b067a65444
commit
9bf65b4f09
|
@ -136,7 +136,6 @@ public class CachedLDAPAuthorizationMap extends DefaultAuthorizationMap implemen
|
|||
|
||||
try {
|
||||
context = createContext();
|
||||
|
||||
if (refreshInterval == -1 && !refreshDisabled) {
|
||||
eventContext = ((EventDirContext)context.lookup(""));
|
||||
|
||||
|
|
|
@ -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"));
|
||||
|
|
Loading…
Reference in New Issue