diff --git a/java_console/autotest/src/com/rusefi/AutoTest.java b/java_console/autotest/src/com/rusefi/AutoTest.java index 9425c37a75..111ad4445f 100644 --- a/java_console/autotest/src/com/rusefi/AutoTest.java +++ b/java_console/autotest/src/com/rusefi/AutoTest.java @@ -67,9 +67,9 @@ public class AutoTest { chart = nextChart(); double x = 100; - assertWave(true, msg, chart, WaveChart.SPARK_1, 0.194433, 0.005, WaveReport.RATIO, x + 180, x + 540); + assertWave(true, msg, chart, WaveChart.SPARK_1, 0.194433, 0.01, WaveReport.RATIO, x + 180, x + 540); assertWaveNull(msg, chart, WaveChart.SPARK_2); - assertWave(true, msg, chart, WaveChart.SPARK_3, 0.194433, 0.005, WaveReport.RATIO, x, x + 360); + assertWave(true, msg, chart, WaveChart.SPARK_3, 0.194433, 0.01, WaveReport.RATIO, x, x + 360); assertWaveNull(msg, chart, WaveChart.SPARK_4); x = 176.856; diff --git a/java_console/autotest/src/com/rusefi/ExecHelper.java b/java_console/autotest/src/com/rusefi/ExecHelper.java index c2e6539b27..c09d24cabd 100644 --- a/java_console/autotest/src/com/rusefi/ExecHelper.java +++ b/java_console/autotest/src/com/rusefi/ExecHelper.java @@ -28,7 +28,9 @@ public class ExecHelper { BufferedReader input = new BufferedReader(new InputStreamReader(ExecHelper.simulatorProcess.getInputStream())); - new Thread(createErrorStreamEcho()).start(); + Thread thread = new Thread(createErrorStreamEcho()); + thread.setDaemon(true); + thread.start(); String line; while ((line = input.readLine()) != null) { diff --git a/java_console/autotest/src/com/rusefi/TestingUtils.java b/java_console/autotest/src/com/rusefi/TestingUtils.java index 44391202b4..c3ce0214f9 100644 --- a/java_console/autotest/src/com/rusefi/TestingUtils.java +++ b/java_console/autotest/src/com/rusefi/TestingUtils.java @@ -25,8 +25,12 @@ public class TestingUtils { return; } if (expectations.length == 1) - fail(msg + ": Got " + current + " while expecting " + Arrays.toString(expectations) + " ratio=" + Math.abs(1 - expectations[0] / current)); - fail(msg + ": Got " + current + " while expecting " + Arrays.toString(expectations)); + fail(msg + ": Got " + current + " while expecting " + Arrays.toString(expectations) + " ratio=" + Math.abs(1 - expectations[0] / current) + printRange(current, ratio)); + fail(msg + ": Got " + current + " while expecting " + Arrays.toString(expectations) + printRange(current, ratio)); + } + + private static String printRange(double current, double ratio) { + return " expected range from " + current * (1 - ratio) + " to " + current + (1 + ratio); } private static double fixAngle(double angle) {