parent
06765eff31
commit
eb4fa43fe9
|
@ -24,6 +24,7 @@ public class HwCiF4Discovery {
|
|||
private final static Class[] tests = {
|
||||
// huh? why does this not work for discovery? PTraceTest.class,
|
||||
CompositeLoggerTest.class,
|
||||
BurnCommandTest.class,
|
||||
MiscTest.class,
|
||||
CommonFunctionalTest.class,
|
||||
PwmHardwareTest.class,
|
||||
|
|
|
@ -0,0 +1,34 @@
|
|||
package com.rusefi.f4discovery;
|
||||
|
||||
import com.rusefi.RusefiTestBase;
|
||||
import com.rusefi.io.LinkManager;
|
||||
import com.rusefi.io.commands.BurnCommand;
|
||||
import org.junit.Test;
|
||||
|
||||
import java.util.concurrent.CountDownLatch;
|
||||
import java.util.concurrent.TimeUnit;
|
||||
import java.util.concurrent.atomic.AtomicReference;
|
||||
|
||||
import static org.junit.Assert.assertTrue;
|
||||
|
||||
public class BurnCommandTest extends RusefiTestBase {
|
||||
@Test
|
||||
public void executeBurnCommand() throws InterruptedException {
|
||||
LinkManager linkManager = ecu.getLinkManager();
|
||||
AtomicReference<Boolean> result = new AtomicReference<>();
|
||||
|
||||
CountDownLatch latch = new CountDownLatch(1);
|
||||
linkManager.submit(new Runnable() {
|
||||
@Override
|
||||
public void run() {
|
||||
result.set(BurnCommand.execute(ecu.getLinkManager().getBinaryProtocol()));
|
||||
latch.countDown();
|
||||
|
||||
}
|
||||
});
|
||||
|
||||
|
||||
latch.await(30, TimeUnit.SECONDS);
|
||||
assertTrue("burn command", result.get());
|
||||
}
|
||||
}
|
Loading…
Reference in New Issue