branch available from https://github.com/phantomjinx/teiid-designer/commits/teiiddes-802-remove-powermock

Summary of Changes

  • Removal of powermock plugin as not compatible with eclipse plugin-unit-testing architecture. Uses its own TestRunner (and ClassLoader) which cannot find classes in dependent bundles;
  • Local build.sh script fixed and can be used to build and test the codebase. All tests enabled and run successfully;
  • Mockito upgraded to 1.9.0. Not strictly necessary but a number of internal bugs have been fixed since 1.8.4;
  • References to ResourcesPlugin.getWorkspace() refactored to ModelerCore.getWorkspace(). Thus, ModelerCore controls access to the workspace alllowing for tests to modify the workspace if necessary, eg. EclipseMock class;
  • Access to test resources standardised across test plugins. All use testdata directory and this is accessed using SmartTestDesignerSuite static methods;
  • Test plugin with AllPluginTests launcher added. This can execute all tests (as plugin tests) in Eclipse. Searches for all AllTests classes and executes them sequentially;
  • ModelerCore class
    • Refactored with all statics added to its registry. Allows tests to replace the object in the registry with their own mocks. This is required since Mockito (or EasyMock) are not able to mock static methods;
    • Registry internalised and only 'lookup' methods available to external classes. Explicit cast to RegistrySPI required to access register/unregister methods;
    • Registry can register PropertyChangePublishers, ie. beans that can change the property used as the key in the registry lookup. Registering these classes, eg. ContainerImpl, the registry becomes a PropertyChangeListener to the object and re-registers the object should the key be changed.

Considerations for further discussion

  • Test plugin containing AllPluginTests launcher added to test feature. Is this necessary?
    • + All tests plugins included in test feature for download
    • - Not a test plugin per-se and not necessary for a build
  • All tests can only execute successfully as plugin tests. Impossible without massive refactoring to execute all tests as junit-only tests.
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators.
For more information on JIRA, see: http://www.atlassian.com/software/jira