TestContext.waitFor(s.getTimeout(), () -> { QueryTask queryTaskResponse = s.sendGetAndWait(queryTaskURI, QueryTask.class); TestContext ctx = new TestContext(1, s.getTimeout()); Operation subscribe = Operation.createPost(queryTaskURI) .setReferer(host.getUri())
TestContext.waitFor(s.getTimeout(), () -> { QueryTask queryTaskResponse = s.sendGetAndWait(queryTaskURI, QueryTask.class); TestContext ctx = new TestContext(1, s.getTimeout()); Operation subscribe = Operation.createPost(queryTaskURI) .setReferer(host.getUri())
public static void stopContinuousQuerySubscription(TestRequestSender s, ServiceHost host, URI notificationTarget, QueryTask qt) { TestContext ctx = new TestContext(1, s.getTimeout()); Operation delete = Operation .createDelete(UriUtils.buildUri(notificationTarget, qt.documentSelfLink)) .setReferer(host.getUri()) .setCompletion(ctx.getCompletion()); host.stopSubscriptionService(delete, notificationTarget); ctx.await(); }
public static void stopContinuousQuerySubscription(TestRequestSender s, ServiceHost host, URI notificationTarget, QueryTask qt) { TestContext ctx = new TestContext(1, s.getTimeout()); Operation delete = Operation .createDelete(UriUtils.buildUri(notificationTarget, qt.documentSelfLink)) .setReferer(host.getUri()) .setCompletion(ctx.getCompletion()); host.stopSubscriptionService(delete, notificationTarget); ctx.await(); }