mirror of https://github.com/OpenIdentityPlatform/OpenDJ.git

Valery Kharseko
yesterday ea06fd66806102fb9790b336afc9770091de3767
opendj-server-legacy/src/test/java/org/opends/server/backends/jdbc/TestCase.java
@@ -97,6 +97,12 @@
            throw new SkipException(getContainerDockerCommand());
         }
      }
      try {
         dropStaleNeighbours();
      } catch (SQLException e) {
         // nothing left behind to drop, or an account the suite cannot log in with: either way the
         // listing below decides, and it fails only where such a leftover is actually there
      }
      try(Connection con = DriverManager.getConnection(createBackendCfg().getDBDirectory())){
         dropStaleTrees(con);
      } catch (Exception e) {
@@ -135,6 +141,18 @@
      }
   }
   /**
    * Drops what a case of a suite made outside the database or the schema of its own connections - a
    * neighbouring directory of the same table names - where a run killed in the middle of that case left
    * it behind. It goes before {@link #dropStaleTrees}, whose listing reaches such a table and whose drop
    * then fails - unqualified on mysql, where the table is in another database, and without the privilege
    * on oracle, where it is another user's - skipping the whole class on every run after it. A container
    * the suite starts is a fresh one; the database of {@link #getContainerDockerCommand()}, which a run
    * without docker falls back on, outlives every run made against it.
    */
   protected void dropStaleNeighbours() throws SQLException {
   }
   @Override
   protected Backend createBackend() {
      return new Backend();