import org.junit.Test;
import org.onap.policy.common.endpoints.http.client.HttpClientFactoryInstance;
import org.onap.policy.controlloop.actorserviceprovider.OperationOutcome;
+import org.onap.policy.controlloop.actorserviceprovider.parameters.HttpPollingConfig;
+import org.onap.policy.controlloop.actorserviceprovider.parameters.HttpPollingParams;
import org.onap.policy.controlloop.policy.PolicyResult;
import org.onap.policy.vfc.VfcRequest;
import org.onap.policy.vfc.VfcResponse;
*/
@Test
public void testSuccess() throws Exception {
- VfcParams opParams = VfcParams.builder().clientName(MY_CLIENT).path("ns").pathGet("jobs").maxGets(1).build();
- config = new VfcConfig(blockingExecutor, opParams, HttpClientFactoryInstance.getClientFactory());
+ HttpPollingParams opParams = HttpPollingParams.builder().clientName(MY_CLIENT).path("ns").pollPath("jobs")
+ .maxPolls(1).build();
+ config = new HttpPollingConfig(blockingExecutor, opParams, HttpClientFactoryInstance.getClientFactory());
params = params.toBuilder().retry(0).timeoutSec(5).executor(blockingExecutor).build();
+
restartOper = new Restart(params, config);
outcome = restartOper.start().get();
public void testConstructor() {
CompletableFuture<OperationOutcome> futureRes = restartOper.startOperationAsync(1, outcome);
assertNotNull(futureRes);
- assertEquals(0, restartOper.getGetCount());
+ assertEquals(0, restartOper.getPollCount());
}
@Test