use of org.ops4j.pax.exam.ExamSystem in project sling by apache.
the class ITWebConsoleRemote method setUp.
@Before
public void setUp() throws IOException {
// static method
if (testContainer == null) {
ExamSystem system = DefaultExamSystem.create(config());
testContainer = PaxExamRuntime.createContainer(system);
testContainer.start();
}
}
use of org.ops4j.pax.exam.ExamSystem in project sling by apache.
the class ITMDCFilter method startContainer.
@Before
public void startContainer() throws Exception {
if (testContainer == null) {
ServerConfiguration sc = new ServerConfiguration();
ExamSystem system = DefaultExamSystem.create(sc.config());
testContainer = PaxExamRuntime.createContainer(system);
testContainer.start();
new RetryLoop(new RetryLoop.Condition() {
public String getDescription() {
return "Check if MDCTestServlet is up";
}
public boolean isTrue() throws Exception {
RequestBuilder rb = new RequestBuilder(ServerConfiguration.getServerUrl());
executor.execute(rb.buildGetRequest("/mdc")).assertStatus(200);
rb = new RequestBuilder(ServerConfiguration.getServerUrl());
//Create test config via servlet
executor.execute(rb.buildGetRequest("/mdc", "createTestConfig", "true"));
TimeUnit.SECONDS.sleep(1);
return true;
}
}, 5, 100);
}
}
Aggregations