use of com.vmware.xenon.common.test.VerificationHost in project photon-model by vmware.
the class AzurePowerServiceTest method createTaskResultListener.
private void createTaskResultListener(VerificationHost host, String taskLink, Function<Operation, Boolean> h) {
StatelessService service = new StatelessService() {
@Override
public void handleRequest(Operation update) {
if (!h.apply(update)) {
super.handleRequest(update);
}
}
};
TestContext ctx = this.host.testCreate(1);
Operation startOp = Operation.createPost(host, taskLink).setCompletion((o, e) -> {
if (e != null) {
ctx.failIteration(e);
return;
}
ctx.completeIteration();
}).setReferer(this.host.getReferer());
this.host.startService(startOp, service);
ctx.await();
}
use of com.vmware.xenon.common.test.VerificationHost in project photon-model by vmware.
the class ResolveCertificateUtil method setUp.
@Before
public void setUp() throws Throwable {
VerificationHost HOST = VerificationHost.create(Integer.valueOf(0));
HOST.setMaintenanceIntervalMicros(TimeUnit.MILLISECONDS.toMicros(250L));
CommandLineArgumentParser.parseFromProperties(HOST);
HOST.setStressTest(HOST.isStressTest);
HOST.start();
ServerX509TrustManager.init(HOST);
}
Aggregations