private boolean messageIsAvailable( List<LogMessage> messages, int severity, String plugin, String message, String stackTrace) { for (LogMessage m : messages) { if (m.getSeverity() == severity && m.getPlugin().equals(plugin) && m.getMessage().equals(message)) { return true; } } return false; }
protected void checkErrorLog(Quickstart qstart) { List<LogMessage> allErrors = new ArrayList<LogMessage>(); List<LogMessage> errors = errorLogView.getErrorMessages(); String errorMessages = ""; for (LogMessage message : errors) { if (!message.getMessage().contains("Unable to delete") && !message.getMessage().contains("Could not delete")) { reporter.addError(qstart, "ERROR IN ERROR LOG: " + message.getMessage()); errorMessages += "\t" + message.getMessage() + "\n"; } } errorLogView.deleteLog(); if (!allErrors.isEmpty()) { fail("There are errors in error log:\n" + errorMessages); } }