use of com.notnoop.apns.utils.junit.Repeat in project java-apns by notnoop.
the class ApnsConnectionTest method sendOneSimple.
@Repeat(count = 50)
@Test(timeout = 2000)
public void sendOneSimple() throws InterruptedException {
ApnsService service = APNS.newService().withSSLContext(clientContext()).withGatewayDestination(LOCALHOST, gatewayPort).build();
server.stopAt(msg1.length());
service.push(msg1);
server.getMessages().acquire();
assertArrayEquals(msg1.marshall(), server.getReceived().toByteArray());
}
use of com.notnoop.apns.utils.junit.Repeat in project java-apns by notnoop.
the class ApnsConnectionTest method sendOneQueued.
@Repeat(count = 50)
@Test(timeout = 2000)
public void sendOneQueued() throws InterruptedException {
ApnsService service = APNS.newService().withSSLContext(clientContext()).withGatewayDestination(LOCALHOST, gatewayPort).asQueued().build();
server.stopAt(msg1.length());
service.push(msg1);
server.getMessages().acquire();
assertArrayEquals(msg1.marshall(), server.getReceived().toByteArray());
}
Aggregations