use of org.allGraphQLCases.subscription.SubscriptionCallbackListInteger in project graphql-maven-plugin-project by graphql-java-generator.
the class FullRequestSubscriptionIT method test_SubscribeToAList.
@Execution(ExecutionMode.CONCURRENT)
@Test
void test_SubscribeToAList() throws GraphQLRequestExecutionException, InterruptedException {
// Preparation
SubscriptionCallbackListInteger callback = new SubscriptionCallbackListInteger("FullRequestSubscriptionIT.test_SubscribeToAList");
// Go, go, go
SubscriptionClient sub = graphQLRepo.subscribeToAList(callback);
// Verification
// Let's wait a max of 20 second, until we receive some notifications
callback.latchForMessageReception.await(20, TimeUnit.SECONDS);
// Let's disconnect from the subscription
sub.unsubscribe();
// We should have received a notification from the subscription
assertNotNull(callback.lastReceivedMessage);
}
use of org.allGraphQLCases.subscription.SubscriptionCallbackListInteger in project graphql-maven-plugin-project by graphql-java-generator.
the class RequestsAgainstTwoGraphQLServersIT method test_GraphQLRepository_allGraphQLCases.
@Test
@Execution(ExecutionMode.CONCURRENT)
void test_GraphQLRepository_allGraphQLCases() throws GraphQLRequestExecutionException, InterruptedException {
// Preparation
SubscriptionCallbackListInteger callback = new SubscriptionCallbackListInteger("FullRequestSubscriptionIT.test_SubscribeToAList");
// Go, go, go
SubscriptionClient sub = graphQLRepoAllGraphQLCases.subscribeToAList(callback);
// Verification
// Let's wait a max of 80 second, until we receive some notifications (this allows some debugging check in the
// server)
callback.latchForMessageReception.await(80, TimeUnit.SECONDS);
// Let's disconnect from the subscription
sub.unsubscribe();
// We should have received a notification from the subscription
assertNotNull(callback.lastReceivedMessage);
}
Aggregations