A good finding Raj! I can see a slight issue with your fix. The executor service and the scheduled executor service in MockInstance class are shared among all the mock instances. If we shutdown them in on instance it will affect all other instances.
On Sun, Mar 8, 2015 at 7:55 PM, Rajkumar Rajaratnam <rajkum...@wso2.com> wrote: > Same applies to eventListenerExecutorService. > > Fixed both in 8def69fc17125fd6b854a6f114672b8f5f427929 > > Thanks. > > On Sun, Mar 8, 2015 at 7:53 PM, Rajkumar Rajaratnam <rajkum...@wso2.com> > wrote: > >> Hi Devs, >> >> If you enable debug logs, you will experience $Subject. The reason is >> that we don't shutdown the healthStatNotifierExecutorService when we >> terminate the mock member. This should be the fix. >> >> >> diff --git >> a/components/org.apache.stratos.mock.iaas/src/main/java/org/apache/stratos/mock/iaas/services/impl/MockInstance.java >> b/components/org.apache.stratos.mock.iaas/src/main/java/org/apache/stratos/mock/iaas/services/impl/Mock >> index ab3d319..43fcf7d 100644 >> --- >> a/components/org.apache.stratos.mock.iaas/src/main/java/org/apache/stratos/mock/iaas/services/impl/MockInstance.java >> +++ >> b/components/org.apache.stratos.mock.iaas/src/main/java/org/apache/stratos/mock/iaas/services/impl/MockInstance.java >> @@ -75,6 +75,8 @@ public class MockInstance implements Runnable, >> Serializable { >> sleep(1000); >> } >> >> + stopHealthStatisticsPublisher(); >> + >> if (log.isInfoEnabled()) { >> log.info(String.format("Mock member terminated: [member-id] >> %s", mockMemberContext.getMemberId())); >> } >> @@ -139,6 +141,10 @@ public class MockInstance implements Runnable, >> Serializable { >> } >> } >> >> + private void stopHealthStatisticsPublisher() { >> + healthStatNotifierExecutorService.shutdownNow(); >> + } >> >> Thanks. >> >> -- >> Rajkumar Rajaratnam >> Committer & PMC Member, Apache Stratos >> Software Engineer, WSO2 >> >> Mobile : +94777568639 >> Blog : rajkumarr.com >> > > > > -- > Rajkumar Rajaratnam > Committer & PMC Member, Apache Stratos > Software Engineer, WSO2 > > Mobile : +94777568639 > Blog : rajkumarr.com > -- Imesh Gunaratne Technical Lead, WSO2 Committer & PMC Member, Apache Stratos