Skip to content

Commit

Permalink
Ensure the test case tag is ended when closing
Browse files Browse the repository at this point in the history
Conflicts:
	src/com/zutubi/android/junitreport/JUnitReportListener.java
  • Loading branch information
sschuberth authored and jsankey committed Oct 17, 2012
1 parent 7b4ef93 commit 0b28d06
Showing 1 changed file with 5 additions and 0 deletions.
5 changes: 5 additions & 0 deletions src/com/zutubi/android/junitreport/JUnitReportListener.java
Original file line number Diff line number Diff line change
Expand Up @@ -291,6 +291,11 @@ public void endTest(Test test) {
public void close() {
if (mSerializer != null) {
try {
// Do this just in case endTest() was not called due to a crash in native code.
if (TAG_CASE.equals(mSerializer.getName())) {
mSerializer.endTag("", TAG_CASE);
}

if (mCurrentSuite != null) {
mSerializer.endTag("", TAG_SUITE);
}
Expand Down

0 comments on commit 0b28d06

Please sign in to comment.