Some Eclipse Foundation services are deprecated, or will be soon. Please ensure you've read this important communication.

Bug 343391

Summary: Add check for unregistered mBeans in Virgo's test runners
Product: [RT] Virgo Reporter: Hristo Iliev <hsiliev>
Component: runtimeAssignee: Hristo Iliev <hsiliev>
Status: CLOSED FIXED QA Contact:
Severity: enhancement    
Priority: P3 CC: glyn.normington
Version: 3.0.0.M03Flags: glyn.normington: review+
Target Milestone: 3.0.0.M05   
Hardware: PC   
OS: Windows 7   
Whiteboard:
Bug Depends on: 343131, 343364    
Bug Blocks:    

Description Hristo Iliev CLA 2011-04-20 08:21:34 EDT
The OSGiTestRunner can be extended to check if all mBeans are removed after framework stop.

Another possible improvement is to automatically unregister the mBeans if the framework fails to stop within timeout.
Comment 1 Glyn Normington CLA 2011-04-20 08:51:01 EDT
This is an improvement rather than a bug.
Comment 2 Hristo Iliev CLA 2011-05-04 02:56:04 EDT
Added check with commit 02a77b4f8dcfc2d499e18d310e53ce85238691fa
Comment 3 Glyn Normington CLA 2011-05-04 03:38:09 EDT
Review complete. The changes look ok. I note that diagnostics will appear on the next test, if any, rather than at the end of a test which leaves mbeans around. It would be better to fail the test which left the mbeans around if possible, but that can be considered an improvement to what is there now.
Comment 4 Glyn Normington CLA 2011-05-04 04:13:22 EDT
(In reply to comment #3)
> Review complete. The changes look ok. I note that diagnostics will appear on
> the next test, if any, rather than at the end of a test which leaves mbeans
> around. It would be better to fail the test which left the mbeans around if
> possible, but that can be considered an improvement to what is there now.

My mistake - apologies. The diagnostics already apply to the current test.
Comment 5 Hristo Iliev CLA 2011-05-11 13:05:05 EDT
Now the mBeans left after test execution were simply printed. I'm going to change the runner so it can fail the test if there are unregistered mBeans.
Comment 6 Hristo Iliev CLA 2011-05-12 03:17:39 EDT
Test runner fails tests that did not unregister mBeans with commit  b4afa5153b601e2f04db02449c0f46a5ebeac5a6