public void setUp() throws Exception {
super.setUp();
- initOperator();
+ initConfig();
- oper = new SoOperation(params, soOperator) {};
+ oper = new SoOperation(params, config) {};
}
@Test
public void testConstructor_testGetWaitMsGet() {
assertEquals(DEFAULT_ACTOR, oper.getActorName());
assertEquals(DEFAULT_OPERATION, oper.getName());
- assertSame(soOperator, oper.getOperator());
+ assertSame(config, oper.getConfig());
assertEquals(1000 * WAIT_SEC_GETS, oper.getWaitMsGet());
}
public void testStartPreprocessorAsync() {
AtomicBoolean guardStarted = new AtomicBoolean();
- oper = new SoOperation(params, soOperator) {
+ oper = new SoOperation(params, config) {
@Override
protected CompletableFuture<OperationOutcome> startGuardAsync() {
guardStarted.set(true);
// use a real executor
params = params.toBuilder().executor(ForkJoinPool.commonPool()).build();
- oper = new SoOperation(params, soOperator) {
+ oper = new SoOperation(params, config) {
@Override
public long getWaitMsGet() {
return 1;
CompletableFuture<OperationOutcome> future2 = oper.postProcessResponse(outcome, PATH, rawResponse, response);
- assertSame(outcome, future2.get(5, TimeUnit.SECONDS));
+ assertSame(outcome, future2.get(500, TimeUnit.SECONDS));
assertEquals(PolicyResult.SUCCESS, outcome.getResult());
assertEquals(2, oper.getGetCount());
// try with null target
params = params.toBuilder().target(null).build();
- oper = new SoOperation(params, soOperator) {};
+ oper = new SoOperation(params, config) {};
assertThatIllegalArgumentException().isThrownBy(() -> oper.prepareSoModelInfo()).withMessage("missing Target");
}
// null payload
params = params.toBuilder().payload(null).build();
- oper = new SoOperation(params, soOperator) {};
+ oper = new SoOperation(params, config) {};
assertNull(oper.buildRequestParameters());
}
// null payload
params = params.toBuilder().payload(null).build();
- oper = new SoOperation(params, soOperator) {};
+ oper = new SoOperation(params, config) {};
assertNull(oper.buildConfigurationParameters());
}