@Test @Category(IntegrationTest.class) public void testGetPollableTask() throws Exception { String pollableTaskName = "testGetPollableTask"; PollableTask parentTask = pollableTaskService.createPollableTask(null, pollableTaskName, null, 0); com.box.l10n.mojito.rest.entity.PollableTask pollableTask = pollableTaskClient.getPollableTask(parentTask.getId()); assertEquals(pollableTaskName, pollableTask.getName()); assertNull(pollableTask.getFinishedDate()); assertFalse(pollableTask.isAllFinished()); }
/** * Configures the context in such a way that the service registy server has a * new unique port, and all provided application contexts are configured to * use it. It also copies properites provided in {@link RatelTest#value()} and * {@link IntegrationTest#value()} annotations. * * @param testContext * the TestContext of a test */ @Override public void prepareTestInstance(TestContext testContext) { applyPropertiesFromAnnotation(testContext, IntegrationTest.class.getName()); applyPropertiesFromAnnotation(testContext, RatelTest.class.getName()); int servicePort = RatelTestContext.getServiceDiscoveryPort(); // hardcoded, can // be changed to // finding free // tcp port applyServiceRegistryProperties(testContext, servicePort); }
private void addIntegrationTestProperty(Collection<String> propertySourceProperties) { propertySourceProperties.add(IntegrationTest.class.getName() + "=true"); }