Package org.apache.sling.testing.tools.retry.RetryLoop

Examples of org.apache.sling.testing.tools.retry.RetryLoop.Condition


            final String [] scripts = { "jsp1.jsp", "jsp2.jsp" };
            for(String script : scripts) {
                toDelete = H.uploadTestScript(unstructuredNode.scriptPath, script, "html.jsp");
                final String expected = "text from " + script + ":" + unstructuredNode.testText;
               
                final Condition c = new Condition() {

                    public String getDescription() {
                        return "Expecting " + expected;
                    }
View Full Code Here


        final String fullTextSearchParameter = "Excepteur";
        final String queryUrl = WEBDAV_BASE_URL + "/content.query.json?queryType=xpath&statement="
                + URLEncoder.encode("/jcr:root/" + folderName
                + "//*[jcr:contains(.,'" + fullTextSearchParameter+ "')]", "UTF-8");

        new RetryLoop(new Condition() {

            public boolean isTrue() throws Exception {
                String result = getContent(queryUrl, CONTENT_TYPE_JSON);

                JSONArray results = new JSONArray(result);
View Full Code Here

        final JSONObject json = new JSONObject(b.getContent(HttpTest.HTTP_BASE_URL + "/testing/EventsCounter.json", HttpTest.CONTENT_TYPE_JSON));
        return json.has(topic) ? json.getInt(topic) : 0;
    }

    public static void waitForEvent(final HttpTestBase b, final String topic, int timeoutSeconds, final int previousCount) {
        final Condition c = new Condition() {
            public String getDescription() {
                return "Wait for OSGi event on topic " + topic;
            }

            public boolean isTrue() throws Exception {
View Full Code Here

TOP

Related Classes of org.apache.sling.testing.tools.retry.RetryLoop.Condition

Copyright © 2018 www.massapicom. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.