Annotation Type JUnitTemporaryDatabase


  • @Inherited
    @Retention(RUNTIME)
    @Target({METHOD,TYPE})
    public @interface JUnitTemporaryDatabase
    JUnitTemporaryDatabase
    Author:
    brozow
    • Optional Element Summary

      Optional Elements 
      Modifier and Type Optional Element Description
      boolean createSchema
      Create the standard OpenNMS schema in the test database.
      boolean dirtiesContext
      Mark the ApplicationContext dirty after a test method executes.
      boolean plpgsqlIplike
      Whether to force using the pl/pgsql version of IPLIKE.
      boolean poolConnections
      Whether to use a connection pool or not.
      boolean reuseDatabase
      Reuse the database for all tests in a class.
      java.lang.Class<? extends TemporaryDatabase> tempDbClass
      Use a specific class for creating temporary databases.
      java.lang.String useExistingDatabase
      Use the specified database instead of a temporary database.
    • Element Detail

      • createSchema

        boolean createSchema
        Create the standard OpenNMS schema in the test database.
        Returns:
        Default:
        true
      • useExistingDatabase

        java.lang.String useExistingDatabase
        Use the specified database instead of a temporary database. Use this if you need to examine data in the database during (e.g.: in a debugger) and/or after a test. The specified database will not be deleted after the test.
        Returns:
        Default:
        ""
      • tempDbClass

        java.lang.Class<? extends TemporaryDatabase> tempDbClass
        Use a specific class for creating temporary databases.
        Returns:
        Default:
        org.opennms.core.test.db.TemporaryDatabasePostgreSQL.class
      • reuseDatabase

        boolean reuseDatabase
        Reuse the database for all tests in a class. A new database is created for every test method and destroyed after every test, regardless of this setting. Ignored if useExistingDatabase is set (for both database creation and destruction).
        Returns:
        Default:
        true
      • dirtiesContext

        boolean dirtiesContext
        Mark the ApplicationContext dirty after a test method executes. After the last test method in a class, the ApplicationContext is always marked dirty, regardless of this setting.
        Returns:
        Default:
        true
      • poolConnections

        boolean poolConnections
        Whether to use a connection pool or not. Defaults to true.
        Returns:
        Default:
        true
      • plpgsqlIplike

        boolean plpgsqlIplike
        Whether to force using the pl/pgsql version of IPLIKE.
        Returns:
        Default:
        false