提交 a189c7bd authored 作者: Noel Grandin's avatar Noel Grandin

remove message rate limiting from TestBase

which is just the weirdest thing ever, and caused me no end of trouble trying to track down why my debugging statements where not appearing
上级 35f13aae
......@@ -67,11 +67,6 @@ public abstract class TestBase {
*/
private static String baseDir = getTestDir("");
/**
* The last time something was printed.
*/
private static long lastPrint;
/**
* The test configuration.
*/
......@@ -388,7 +383,6 @@ public abstract class TestBase {
*/
public void trace(String s) {
if (config.traceTest) {
lastPrint = 0;
println(s);
}
}
......@@ -459,7 +453,6 @@ public abstract class TestBase {
* @throws AssertionError always throws an AssertionError
*/
protected void fail(String string) {
lastPrint = 0;
if (string.length() > 100) {
// avoid long strings with special characters, because they are slow
// to display in Eclipse
......@@ -529,11 +522,8 @@ public abstract class TestBase {
*/
public void println(String s) {
long now = System.nanoTime();
if (now > lastPrint + TimeUnit.SECONDS.toNanos(1)) {
lastPrint = now;
long time = TimeUnit.NANOSECONDS.toMillis(now - start);
printlnWithTime(time, getClass().getName() + " " + s);
}
long time = TimeUnit.NANOSECONDS.toMillis(now - start);
printlnWithTime(time, getClass().getName() + " " + s);
}
/**
......
Markdown 格式
0%
您添加了 0 到此讨论。请谨慎行事。
请先完成此评论的编辑!
注册 或者 后发表评论