Skip to content
This repository has been archived by the owner on Nov 9, 2017. It is now read-only.

Commit

Permalink
Use jUnit assert*() rather than java assert in pinger tests and minor
Browse files Browse the repository at this point in the history
tests polishing
  • Loading branch information
ppalaga committed May 13, 2015
1 parent f23593f commit 2c2a3c5
Showing 1 changed file with 8 additions and 7 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -25,6 +25,7 @@
import org.hawkular.component.pinger.PingStatus;
import org.hawkular.component.pinger.Pinger;
import org.hawkular.metrics.client.common.SingleMetric;
import org.junit.Assert;
import org.junit.Test;

/**
Expand All @@ -34,27 +35,27 @@
*/
public class PingerTest {

@org.junit.Test
@Test
public void testPinger() throws Exception {

Pinger pinger = new Pinger();
PingDestination destination = new PingDestination("123","http://hawkular.github.io");
PingStatus status = pinger.ping(new PingStatus(destination)).get();

assert status.getCode()==200;
assert status.isTimedOut()==false;
Assert.assertEquals(200, status.getCode());
Assert.assertFalse(status.isTimedOut());

}

@org.junit.Test
@Test
public void testSslPinger() throws Exception {

Pinger pinger = new Pinger();
PingDestination destination = new PingDestination("123","https://www.perfcake.org");
PingStatus status = pinger.ping(new PingStatus(destination)).get();

assert status.getCode()==200;
assert status.isTimedOut()==false;
Assert.assertEquals(200, status.getCode());
Assert.assertFalse(status.isTimedOut());
}

@Test
Expand Down Expand Up @@ -95,7 +96,7 @@ public void testPingManagerStartup() throws Exception {
}


private class NoOpMetricPublisher extends MetricPublisher {
private static class NoOpMetricPublisher extends MetricPublisher {
@Override
public void sendToMetricsViaRest(String tenantId, List<Map<String, Object>> metrics) {

Expand Down

0 comments on commit 2c2a3c5

Please sign in to comment.