3 Replies Latest reply on Jul 10, 2007 12:08 PM by adrian.brock

    AccessControlTestCase

    kconner

      The above test case is currently failing within the kernel module when executed under maven.

      The reason for the failure is the name of the directory containing the test classes. :)

      There is a security policy in effect for the tests, TestsPolicyPlugin, which is responsible for assigning the permissions based on the code source. This policy class allows the permissions to be configured via a property file (not used in this case) if it believes that the code source represents a test location.

      How does it determine whether the code source represents tests? Simple, it looks for 'tests' or '-test.jar' in the name of the code source (last directory/file only). If the code source represents a test location then it is given a specific set of permissions plus the ones specified in the property file. If it does not represent a test location then it defaults to all permissions.

      If this is run in the current eclipse setup then it works, the final directory is tests-classes (almost certainly a typo of mine). If this is run via maven then it fails as the final directory is test-classes. :(