Community
Participate
Working Groups
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.
This is an improvement rather than a bug.
Added check with commit 02a77b4f8dcfc2d499e18d310e53ce85238691fa
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.
(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.
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.
Test runner fails tests that did not unregister mBeans with commit b4afa5153b601e2f04db02449c0f46a5ebeac5a6