From 21379669bc7ad2832b55568041bd349a139a2ca9 Mon Sep 17 00:00:00 2001 From: rusefillc Date: Mon, 21 Jun 2021 00:50:11 -0400 Subject: [PATCH] TS Burned All Data engine stop #2839 test case? --- .../src/com/rusefi/RusefiTestBase.java | 5 ++++ .../f4discovery/CommonFunctionalTest.java | 24 +------------------ .../rusefi/f4discovery/PwmHardwareTest.java | 19 ++++++++++++++- 3 files changed, 24 insertions(+), 24 deletions(-) diff --git a/java_console/autotest/src/com/rusefi/RusefiTestBase.java b/java_console/autotest/src/com/rusefi/RusefiTestBase.java index fac9b8987d..4228b19f81 100644 --- a/java_console/autotest/src/com/rusefi/RusefiTestBase.java +++ b/java_console/autotest/src/com/rusefi/RusefiTestBase.java @@ -1,6 +1,7 @@ package com.rusefi; import com.rusefi.functional_tests.EcuTestHelper; +import com.rusefi.waves.EngineChart; import org.junit.Before; public class RusefiTestBase { @@ -15,4 +16,8 @@ public class RusefiTestBase { public void startUp() { ecu = EcuTestHelper.createInstance(needsHardwareTriggerInput()); } + + protected EngineChart nextChart() { + return TestingUtils.nextChart(ecu.commandQueue); + } } diff --git a/java_console/autotest/src/com/rusefi/f4discovery/CommonFunctionalTest.java b/java_console/autotest/src/com/rusefi/f4discovery/CommonFunctionalTest.java index cb035b252b..0355bf8e43 100644 --- a/java_console/autotest/src/com/rusefi/f4discovery/CommonFunctionalTest.java +++ b/java_console/autotest/src/com/rusefi/f4discovery/CommonFunctionalTest.java @@ -2,8 +2,6 @@ package com.rusefi.f4discovery; import com.rusefi.RusefiTestBase; -import com.rusefi.TestingUtils; -import com.rusefi.config.generated.Fields; import com.rusefi.core.Sensor; import com.rusefi.core.SensorCentral; import com.rusefi.functional_tests.EcuTestHelper; @@ -12,9 +10,8 @@ import org.junit.Test; import java.util.Arrays; -import static com.rusefi.IoUtil.getDisableCommand; import static com.rusefi.IoUtil.getEnableCommand; -import static com.rusefi.TestingUtils.*; +import static com.rusefi.TestingUtils.assertNull; import static com.rusefi.config.generated.Fields.*; import static org.junit.Assert.assertFalse; import static org.junit.Assert.assertTrue; @@ -28,22 +25,6 @@ import static org.junit.Assert.assertTrue; * 3/5/14 */ public class CommonFunctionalTest extends RusefiTestBase { - @Test - public void scheduleBurnDoesNotAffectTriggerIssue2839() { - ecu.setEngineType(ET_FORD_ASPIRE); - sendComplexCommand("set " + "trigger_type" + " " + TT_TT_TOOTHED_WHEEL_60_2); - ecu.sendCommand(getDisableCommand(Fields.CMD_SELF_STIMULATION)); - ecu.sendCommand(getEnableCommand(CMD_EXTERNAL_STIMULATION)); - ecu.changeRpm(1200); - nextChart(); - nextChart(); - int triggerErrors = (int) SensorCentral.getInstance().getValueSource(Sensor.totalTriggerErrorCounter).getValue(); - for (int i = 0; i < 7; i++) - sendComplexCommand(CMD_BURNCONFIG); - int totalTriggerErrorsNow = (int) SensorCentral.getInstance().getValueSource(Sensor.totalTriggerErrorCounter).getValue(); - EcuTestHelper.assertEquals("totalTriggerErrorCounter", totalTriggerErrorsNow, triggerErrors); - } - @Test public void testChangingIgnitionMode() { ecu.setEngineType(ET_FORD_ASPIRE); @@ -526,7 +507,4 @@ public class CommonFunctionalTest extends RusefiTestBase { Arrays.stream(keys).peek(k -> assertWaveNoRises(chart, k)); } - private EngineChart nextChart() { - return TestingUtils.nextChart(ecu.commandQueue); - } } diff --git a/java_console/autotest/src/com/rusefi/f4discovery/PwmHardwareTest.java b/java_console/autotest/src/com/rusefi/f4discovery/PwmHardwareTest.java index dbc59ac241..ae0568a9a1 100644 --- a/java_console/autotest/src/com/rusefi/f4discovery/PwmHardwareTest.java +++ b/java_console/autotest/src/com/rusefi/f4discovery/PwmHardwareTest.java @@ -6,7 +6,6 @@ import com.rusefi.config.generated.Fields; import com.rusefi.core.Sensor; import com.rusefi.core.SensorCentral; import com.rusefi.functional_tests.EcuTestHelper; -import org.junit.Ignore; import org.junit.Test; import static com.rusefi.IoUtil.getDisableCommand; @@ -29,6 +28,24 @@ public class PwmHardwareTest extends RusefiTestBase { private static final int FREQUENCY = 160; + @Test + public void scheduleBurnDoesNotAffectTriggerIssue2839() { + ecu.setEngineType(ET_FORD_ASPIRE); + ecu.sendCommand("set " + "trigger_type" + " " + TT_TT_TOOTHED_WHEEL_60_2); + ecu.sendCommand(getDisableCommand(Fields.CMD_SELF_STIMULATION)); + ecu.sendCommand(getEnableCommand(CMD_EXTERNAL_STIMULATION)); + ecu.changeRpm(1200); + nextChart(); + nextChart(); + int triggerErrors = (int) SensorCentral.getInstance().getValueSource(Sensor.totalTriggerErrorCounter).getValue(); +/* + for (int i = 0; i < 7; i++) + ecu.sendCommand(CMD_BURNCONFIG); + */ + int totalTriggerErrorsNow = (int) SensorCentral.getInstance().getValueSource(Sensor.totalTriggerErrorCounter).getValue(); + EcuTestHelper.assertEquals("totalTriggerErrorCounter", totalTriggerErrorsNow, triggerErrors); + } + @Test public void testIdlePin() { ecu.setEngineType(ET_FRANKENSO_MIATA_NA6);