def start(self):
        # Removes possible left over cached engine
        # (needed if non-patched engine is run prior)
        repository.engineFactory(reset=True)

        # Override the Repository database name
        try:
            self._configPatch.start()
            self._configPatchApplied = True

            # Verity that the database doesn't exist yet
            assert self.tempDatabaseName not in getAllDatabaseNames(), (
                "Temp repo db=%s already existed" % (self.tempDatabaseName, ))

            # Now create the temporary repository database
            self._attemptedToCreateRepository = True
            repository.reset()

            # Verify that the temporary repository database got created
            assert self.tempDatabaseName in getAllDatabaseNames(), (
                "Temp repo db=%s not found" % (self.tempDatabaseName, ))
        except:
            # Attempt to clean up
            self.stop()

            raise
  def start(self):
    # Removes possible left over cached engine
    # (needed if non-patched engine is run prior)
    repository.engineFactory(reset=True)

    # Override the Repository database name
    try:
      self._configPatch.start()
      self._configPatchApplied = True

      # Verity that the database doesn't exist yet
      assert self.tempDatabaseName not in getAllDatabaseNames(), (
        "Temp repo db=%s already existed" % (self.tempDatabaseName,))

      # Now create the temporary repository database
      self._attemptedToCreateRepository = True
      repository.reset()

      # Verify that the temporary repository database got created
      assert self.tempDatabaseName in getAllDatabaseNames(), (
        "Temp repo db=%s not found" % (self.tempDatabaseName,))
    except:
      # Attempt to clean up
      self.stop()

      raise
 def initTempDatabase(self):
   """Initialize the temporary repository database with default schema and
   contents
   """
   repository.reset()
示例#4
0
 def initTempDatabase(self):
     """Initialize the temporary repository database with default schema and
 contents
 """
     repository.reset()