Skip to content

Commit

Permalink
Fix the test case. (apache#1879)
Browse files Browse the repository at this point in the history
  • Loading branch information
JaredTan95 authored and wu-sheng committed Nov 6, 2018
1 parent dc379fd commit 7537af0
Showing 1 changed file with 9 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -34,6 +34,7 @@
import javax.servlet.http.HttpServletRequest;
import javax.servlet.http.HttpServletResponse;
import org.apache.skywalking.oap.server.core.alarm.AlarmMessage;
import org.apache.skywalking.oap.server.core.source.Scope;
import org.eclipse.jetty.server.Server;
import org.eclipse.jetty.servlet.ServletContextHandler;
import org.eclipse.jetty.servlet.ServletHolder;
Expand Down Expand Up @@ -72,8 +73,14 @@ public void testWebhook() {
remoteEndpoints.add("http://127.0.0.1:8778/webhook/receiveAlarm");
WebhookCallback webhookCallback = new WebhookCallback(remoteEndpoints);
List<AlarmMessage> alarmMessages = new ArrayList<>(2);
alarmMessages.add(new AlarmMessage());
alarmMessages.add(new AlarmMessage());
AlarmMessage alarmMessage = new AlarmMessage();
alarmMessage.setScope(Scope.All);
alarmMessage.setAlarmMessage("alarmMessage with [Scope.All]");
alarmMessages.add(alarmMessage);
AlarmMessage anotherAlarmMessage = new AlarmMessage();
anotherAlarmMessage.setScope(Scope.Endpoint);
anotherAlarmMessage.setAlarmMessage("anotherAlarmMessage with [Scope.Endpoint]");
alarmMessages.add(anotherAlarmMessage);
webhookCallback.doAlarm(alarmMessages);

Assert.assertTrue(isSuccess);
Expand Down

0 comments on commit 7537af0

Please sign in to comment.