aboutsummaryrefslogtreecommitdiff
path: root/src/test/java/org
diff options
context:
space:
mode:
authorAnton Tananaev <anton@traccar.org>2022-12-14 16:08:25 -0800
committerAnton Tananaev <anton@traccar.org>2022-12-14 16:08:25 -0800
commit3b36ac38a0c4e193ea8085eb5556dffd8205bb17 (patch)
tree45d60d8132bdacac3901282bb8ba09ddb3640c45 /src/test/java/org
parent836dc4138fdcf560a31c6a90769b19f6a0d0e438 (diff)
downloadtrackermap-server-3b36ac38a0c4e193ea8085eb5556dffd8205bb17.tar.gz
trackermap-server-3b36ac38a0c4e193ea8085eb5556dffd8205bb17.tar.bz2
trackermap-server-3b36ac38a0c4e193ea8085eb5556dffd8205bb17.zip
Handle motion fluctuation (fix #5000)
Diffstat (limited to 'src/test/java/org')
-rw-r--r--src/test/java/org/traccar/handler/events/MotionEventHandlerTest.java7
1 files changed, 3 insertions, 4 deletions
diff --git a/src/test/java/org/traccar/handler/events/MotionEventHandlerTest.java b/src/test/java/org/traccar/handler/events/MotionEventHandlerTest.java
index 25c766b51..b77676dc8 100644
--- a/src/test/java/org/traccar/handler/events/MotionEventHandlerTest.java
+++ b/src/test/java/org/traccar/handler/events/MotionEventHandlerTest.java
@@ -1,6 +1,5 @@
package org.traccar.handler.events;
-import org.junit.Ignore;
import org.junit.Test;
import org.traccar.BaseTest;
import org.traccar.model.Event;
@@ -62,7 +61,6 @@ public class MotionEventHandlerTest extends BaseTest {
verifyState(state, false, 0);
}
- @Ignore
@Test
public void testMotionFluctuation() throws ParseException {
TripsConfig tripsConfig = new TripsConfig(500, 300000, 300000, 0, false, false, 0.01);
@@ -87,11 +85,11 @@ public class MotionEventHandlerTest extends BaseTest {
MotionProcessor.updateState(state, position("2017-01-01 00:04:00", true, 1000, null), true, tripsConfig);
assertNull(state.getEvent());
- verifyState(state, true, 1000);
+ verifyState(state, true, 0);
MotionProcessor.updateState(state, position("2017-01-01 00:06:00", true, 2000, null), true, tripsConfig);
assertNull(state.getEvent());
- verifyState(state, true, 2000);
+ verifyState(state, true, 0);
}
@Test
@@ -99,6 +97,7 @@ public class MotionEventHandlerTest extends BaseTest {
TripsConfig tripsConfig = new TripsConfig(500, 300000, 300000, 0, true, false, 0.01);
MotionState state = new MotionState();
+ state.setMotionStreak(true);
state.setMotionState(true);
MotionProcessor.updateState(state, position("2017-01-01 00:00:00", false, 100, true), false, tripsConfig);