public void testChangingJsp()

in src/main/java/org/apache/sling/launchpad/webapp/integrationtest/JspScriptingTest.java [135:163]


    public void testChangingJsp() throws Exception {
        String toDelete = null;

        try {
            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;
                    }

                    public boolean isTrue() throws Exception {
                        final String content = H.getContent(unstructuredNode.nodeUrl + ".html", HttpTest.CONTENT_TYPE_HTML);
                        return content.contains(expected);
                    }
                };
                
                new RetryLoop(c, CHECK_CONTENT_TIMEOUT_SECONDS, CHECK_CONTENT_INTERVAL_MSEC);
            }
        } finally {
            if(toDelete != null) {
                H.getTestClient().delete(toDelete);
            }
        }
    }