diff --git a/src/main/java/edu/iris/dmc/station/conditions/DistanceCondition.java b/src/main/java/edu/iris/dmc/station/conditions/DistanceCondition.java index 5c3341e..5f4705a 100644 --- a/src/main/java/edu/iris/dmc/station/conditions/DistanceCondition.java +++ b/src/main/java/edu/iris/dmc/station/conditions/DistanceCondition.java @@ -43,7 +43,7 @@ public Message evaluate(Station station) { channel.getLongitude().getValue(), station.getLatitude().getValue(), station.getLongitude().getValue(), "K"); if (distance > this.margin) { - nestedMessage.add(Result.error("Distance between Sta: " + nestedMessage.add(Result.warning("Distance between Sta: " + station.getCode() + " and Chan: " + channel.getCode() + " Loc: " + channel.getLocationCode() + " is expected to be less than " + margin + " km but is " + distance + " km")); returnmessage=true; diff --git a/src/main/java/edu/iris/dmc/station/conditions/SampleRateCondition.java b/src/main/java/edu/iris/dmc/station/conditions/SampleRateCondition.java index f06083f..f9464fe 100644 --- a/src/main/java/edu/iris/dmc/station/conditions/SampleRateCondition.java +++ b/src/main/java/edu/iris/dmc/station/conditions/SampleRateCondition.java @@ -41,7 +41,7 @@ public Message evaluate(Channel channel) { if (sampleRate.getValue() != 0) { } else { - return Result.error("Sample rate cannot be 0 or null."); + return Result.warning("Sample rate cannot be 0 or null."); } } else { diff --git a/src/test/java/edu/iris/dmc/station/conditions/Condition305Test.java b/src/test/java/edu/iris/dmc/station/conditions/Condition305Test.java index 7bd8e80..6a03e85 100644 --- a/src/test/java/edu/iris/dmc/station/conditions/Condition305Test.java +++ b/src/test/java/edu/iris/dmc/station/conditions/Condition305Test.java @@ -36,7 +36,7 @@ public void fail() throws Exception { SampleRateCondition condition = new SampleRateCondition(true, ""); Message result = condition.evaluate(c); - assertTrue(result instanceof edu.iris.dmc.station.rules.Error); + assertTrue(result instanceof edu.iris.dmc.station.rules.Warning); } }