This commit is contained in:
Roman Shevchenko
2010-09-02 16:10:43 +04:00
parent f8846a7c0a
commit ca31a6dc82
@@ -46,7 +46,7 @@ import java.net.URLClassLoader;
import java.util.Arrays;
import java.util.List;
@SuppressWarnings({"HardCodedStringLiteral"})
@SuppressWarnings({"HardCodedStringLiteral", "CallToPrintStackTrace", "UseOfSystemOutOrSystemErr"})
public class TestAll implements Test {
static {
@@ -112,6 +112,7 @@ public class TestAll implements Test {
if (currentThread != null) {
currentThread.interrupt();
if (!currentThread.isInterrupted()) {
//noinspection deprecation
currentThread.stop(new RuntimeException("Current Test Interrupted: OUT OF TIME!"));
}
@@ -142,7 +143,7 @@ public class TestAll implements Test {
}
private void addErrorMessage(TestResult testResult, String message) {
String processedTestsMessage = myRunTests <= 0 ? "Noone test was run" : myRunTests + " tests processed";
String processedTestsMessage = myRunTests <= 0 ? "None of tests was run" : myRunTests + " tests processed";
try {
testResult.startTest(this);
testResult.addError(this, new Throwable(processedTestsMessage + " before: " + message));
@@ -287,8 +288,7 @@ public class TestAll implements Test {
long realFreeMemory = runtime.freeMemory() + (maxMemory - runtime.totalMemory());
long meg = 1024 * 1024;
long needed = neededMemory * meg;
boolean possibleOutOfMemoryError = realFreeMemory < needed;
return possibleOutOfMemoryError;
return realFreeMemory < needed;
}
private static Test getTest(Class testCaseClass) {