fix errors in tests
This commit is contained in:
parent
3cfc9c16fe
commit
ad74a9ba9a
|
@ -20,8 +20,8 @@ public abstract class PluginBase {
|
|||
DISABLED
|
||||
}
|
||||
|
||||
State state = State.NOT_INITIALIZED;
|
||||
boolean isFragmentVisible = false;
|
||||
private State state = State.NOT_INITIALIZED;
|
||||
private boolean isFragmentVisible = false;
|
||||
public PluginDescription pluginDescription;
|
||||
|
||||
|
||||
|
@ -152,7 +152,10 @@ public abstract class PluginBase {
|
|||
if (getType() == PluginType.PUMP) {
|
||||
new Thread(() -> {
|
||||
SystemClock.sleep(3000);
|
||||
ConfigBuilderPlugin.getCommandQueue().readStatus("Pump driver changed.", null);
|
||||
try {
|
||||
ConfigBuilderPlugin.getCommandQueue().readStatus("Pump driver changed.", null);
|
||||
} catch (Exception ignored) { // Thread fail to start in tests
|
||||
}
|
||||
}).start();
|
||||
}
|
||||
}
|
||||
|
|
|
@ -14,9 +14,6 @@ import org.powermock.modules.junit4.PowerMockRunner;
|
|||
import info.AAPSMocker;
|
||||
import info.nightscout.androidaps.MainApp;
|
||||
import info.nightscout.androidaps.R;
|
||||
import info.nightscout.androidaps.db.Treatment;
|
||||
import info.nightscout.androidaps.events.EventTreatmentChange;
|
||||
import info.nightscout.androidaps.interfaces.PluginBase;
|
||||
import info.nightscout.androidaps.interfaces.PluginType;
|
||||
import info.nightscout.androidaps.plugins.ConfigBuilder.ConfigBuilderPlugin;
|
||||
import info.nightscout.androidaps.plugins.PumpVirtual.VirtualPumpPlugin;
|
||||
|
|
|
@ -20,7 +20,7 @@ import static org.junit.Assert.assertTrue;
|
|||
* Created by mike on 20.11.2017.
|
||||
*/
|
||||
@RunWith(PowerMockRunner.class)
|
||||
@PrepareForTest({MainApp.class, DateUtil.class})
|
||||
@PrepareForTest({MainApp.class})
|
||||
public class DateUtilTest {
|
||||
|
||||
@Test
|
||||
|
|
Loading…
Reference in a new issue