-
Bug
-
Resolution: Fixed
-
P3
-
1.0
-
None
-
1.0
-
sparc
-
generic
-
Verified
When I run following test:
for (int i=0; i<2; i++) {
mserver.addNotificationListener(delegateName, dummyListener, null, s1);
mserver.addNotificationListener(delegateName, dummyListener, null, s2);
mserver.addNotificationListener(delegateName, dummyListener, null, s3);
mserver.removeNotificationListener(delegateName, dummyListener);
try {
mserver.removeNotificationListener(delegateName, dummyListener, null, s1);
System.out.println("Failed to remove a listener.");
return false;
} catch (ListenerNotFoundException lne) {
// As expected.
}
}
the first cycle is well passed, but since second cycle, the main thread is blocked for a while when adding the listener second time.
The test is passed, but it takes long time
for (int i=0; i<2; i++) {
mserver.addNotificationListener(delegateName, dummyListener, null, s1);
mserver.addNotificationListener(delegateName, dummyListener, null, s2);
mserver.addNotificationListener(delegateName, dummyListener, null, s3);
mserver.removeNotificationListener(delegateName, dummyListener);
try {
mserver.removeNotificationListener(delegateName, dummyListener, null, s1);
System.out.println("Failed to remove a listener.");
return false;
} catch (ListenerNotFoundException lne) {
// As expected.
}
}
the first cycle is well passed, but since second cycle, the main thread is blocked for a while when adding the listener second time.
The test is passed, but it takes long time