Annotation Type SkipWhenDatabaseIs


Marker annotation that allows controlling whether specific tests are invoked based on whether the connection is to one database type or not; optionally specifying version constraints. While a test can be marked specifically with SkipWhenDatabaseVersion annotations, it is desirable to use this annotation instead to influence the skip not only based on the version but also the database type as MariaDB and MySQL both have different version schemes that will eventually collide. Furthermore, the reason specified can be provided differently per database version, allowing the test output to be as explicit as possible for why a given test is skipped as the reason in the version takes precedence over the one at the database skip level. The database skip reason will only be present if there are no version contraints or if all version constraits provide no reason text.
Author:
Chris Cranford
  • Nested Class Summary

    Nested Classes
    Modifier and Type
    Class
    Description
    static enum 
     
  • Required Element Summary

    Required Elements
    Modifier and Type
    Required Element
    Description
    Returns which database platform this skip exclusion applies
  • Optional Element Summary

    Optional Elements
    Modifier and Type
    Optional Element
    Description
    Returns why the database is skipped.
    Returns an array of database version constraints applied to skip rule
  • Element Details

    • versions

      Returns an array of database version constraints applied to skip rule
      Default:
      {}
    • reason

      String reason
      Returns why the database is skipped. When specifying version constraints, the version constraint reasons will have a priority over this reason when writing the skip reason to the test output stream.
      Default:
      ""