Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix for Issue: "After a delete run, tag search throws exception" #36

Merged
merged 1 commit into from
Jun 21, 2012
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
11 changes: 10 additions & 1 deletion harness/src/com/sun/faban/harness/webclient/ResultAction.java
Original file line number Diff line number Diff line change
Expand Up @@ -461,12 +461,21 @@ public String archive(HttpServletRequest request,
}

public String deleteResults(HttpServletRequest request,
HttpServletResponse response) {
HttpServletResponse response) throws IOException {
String[] runIds = request.getParameterValues("select");
if (runIds != null) {
TagEngine tagEngine;
try {
tagEngine = TagEngine.getInstance();
} catch (ClassNotFoundException ex) {
logger.log(Level.SEVERE, "Cannot find tag engine class", ex);
throw new IOException("Cannot find tag engine class", ex);
}
for (String r : runIds) {
RunResult runResult = RunResult.getInstance(new RunId(r));
runResult.delete(r);
tagEngine.removeRun(r);
tagEngine.save();
}
}
HttpSession session = request.getSession();
Expand Down
4 changes: 2 additions & 2 deletions harness/src/com/sun/faban/harness/webclient/RunResult.java
Original file line number Diff line number Diff line change
Expand Up @@ -403,8 +403,8 @@ public static SortableTableModel getResultTable(Subject user, String tags,
} catch (Exception e) {
logger.log(Level.WARNING, "Cannot remove run " + runid, e);
}
}
resultList.add(res);
} else
resultList.add(res);
} catch (Exception e) {
logger.log(Level.WARNING, "Cannot read result dir " + runid, e);
}
Expand Down