mirror of
https://github.com/apache/activemq.git
synced 2025-03-03 14:49:07 +00:00
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 {
|
try {
|
||||||
context = createContext();
|
context = createContext();
|
||||||
|
|
||||||
if (refreshInterval == -1 && !refreshDisabled) {
|
if (refreshInterval == -1 && !refreshDisabled) {
|
||||||
eventContext = ((EventDirContext)context.lookup(""));
|
eventContext = ((EventDirContext)context.lookup(""));
|
||||||
|
|
||||||
|
@ -286,12 +286,12 @@ public abstract class AbstractCachedLDAPAuthorizationMapLegacyTest extends Abstr
|
|||||||
testRestart(true);
|
testRestart(true);
|
||||||
}
|
}
|
||||||
|
|
||||||
public void testRestart(boolean sync) throws Exception {
|
public void testRestart(final boolean sync) throws Exception {
|
||||||
map.query();
|
|
||||||
if (sync) {
|
if (sync) {
|
||||||
// ldap connection can be slow to close
|
// ldap connection can be slow to close
|
||||||
map.setRefreshInterval(1000);
|
map.setRefreshInterval(1000);
|
||||||
}
|
}
|
||||||
|
map.query();
|
||||||
|
|
||||||
Set<?> failedACLs = map.getReadACLs(new ActiveMQQueue("FAILED"));
|
Set<?> failedACLs = map.getReadACLs(new ActiveMQQueue("FAILED"));
|
||||||
assertEquals("set size: " + failedACLs, 0, failedACLs.size());
|
assertEquals("set size: " + failedACLs, 0, failedACLs.size());
|
||||||
@ -305,7 +305,11 @@ public abstract class AbstractCachedLDAPAuthorizationMapLegacyTest extends Abstr
|
|||||||
// as we can't rely on ldar server isStarted()
|
// as we can't rely on ldar server isStarted()
|
||||||
Wait.waitFor(new Wait.Condition() {
|
Wait.waitFor(new Wait.Condition() {
|
||||||
public boolean isSatisified() throws Exception {
|
public boolean isSatisified() throws Exception {
|
||||||
return map.context == null;
|
if (sync) {
|
||||||
|
return !map.isContextAlive();
|
||||||
|
} else {
|
||||||
|
return map.context == null;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user