def METHOD_NAME(self):
    """write failures shall not corrupt the database"""
    # First prepopulate the database
    start = 10
    for x in range(start, 0, -1):
        self.t.runSuccess("track tag{0} {1}min ago".format((start + 1)-x, x))
    self.save_database()
    # Now start in with the failures and make sure the database compares
    # equally
    TAG_COUNT = 30
    error_count = 0
    success_count = 0
    MAX_ERROR_COUNT=250
    for x in range(TAG_COUNT, 0, -1):
        while True: 
            exitcode, stdout, stderr = self.t("track tag-{0} {1}s ago".format((TAG_COUNT+1)-x, x))
            if exitcode != 0:
                error_count += 1
                if error_count >= MAX_ERROR_COUNT:
                    break
                if not self.compare_dirs(self.t.datadir, self._goldendir):
                    filecmp.dircmp(self.t.datadir, self._goldendir).report_full_closure()
                    self.fail("{0} not equal to {1}".format(self.t.datadir, self._goldendir))
            else:
                success_count += 1
                break
        if error_count >= MAX_ERROR_COUNT:
            break
        self.save_database()
    self.t.runSuccess("export")
    print("Test pass. Timew returned an error on {0} runs and none on {1} runs.".format(error_count, success_count))