do print perforce logs when test fails

This commit is contained in:
Alexey Kudravtsev
2012-06-22 17:08:03 +04:00
parent 6a36296850
commit a16dc7a8e7
2 changed files with 4 additions and 5 deletions
@@ -20,12 +20,11 @@ import org.junit.rules.TestName;
import org.junit.runner.Description;
public abstract class AbstractJunitVcsTestCase extends AbstractVcsTestCase {
private boolean succeeded = true;
@Rule
public TestName name= new TestName(){
@Override
protected void failed(Throwable e, Description description) {
succeeded = false;
AbstractJunitVcsTestCase.this.failed(e, description);
}
};
@@ -33,7 +32,6 @@ public abstract class AbstractJunitVcsTestCase extends AbstractVcsTestCase {
return name.getMethodName();
}
public boolean isSucceeded() {
return succeeded;
protected void failed(Throwable e, Description description) {
}
}
@@ -1442,9 +1442,10 @@ public class ChangeListManagerImpl extends ChangeListManagerEx implements Projec
@TestOnly
public static void printLog() {
System.out.println(log);
System.out.flush();
}
@TestOnly
public static void log(Object o) {
log.append(o+"\n");
log.append(o).append("\n");
}
}