Package hudson.model

Examples of hudson.model.FreeStyleBuild$RunnerImpl


                new Throwable().printStackTrace(listener.error("Injecting a failure"));
                return true;
            }
        });

        FreeStyleBuild b = buildAndAssertSuccess(p);

        createWebClient().getPage(b,"console");

        // TODO: check if the annotation is placed
        // TODO: test an exception with cause and message
View Full Code Here


                listener.getLogger().println("ooo");
                return true;
            }
        });

        FreeStyleBuild b = buildAndAssertSuccess(p);

        // make sure we see the annotation
        HtmlPage rsp = createWebClient().getPage(b, "console");
        assertEquals(1,rsp.selectNodes("//B[@class='demo']").size());

        // make sure raw console output doesn't include the garbage
        TextPage raw = (TextPage)createWebClient().goTo(b.getUrl()+"consoleText","text/plain");
        System.out.println(raw.getContent());
        String nl = System.getProperty("line.separator");
        assertTrue(raw.getContent().contains(nl+"---"+nl+"ooo"+nl+"ooo"+nl));

        // there should be two 'ooo's
View Full Code Here

                listener.getLogger().print(HyperlinkNote.encodeTo("http://infradna.com/","def")+"\n");
                return true;
            }
        });

        FreeStyleBuild b = buildAndAssertSuccess(p);

        // make sure we see the annotation
        HtmlPage rsp = createWebClient().getPage(b, "console");
        assertEquals(1,rsp.selectNodes("//A[@href='http://infradna.com/']").size());

        // make sure raw console output doesn't include the garbage
        TextPage raw = (TextPage)createWebClient().goTo(b.getUrl()+"consoleText","text/plain");
        System.out.println(raw.getContent());
        assertTrue(raw.getContent().contains("\nabc\ndef\n"));
    }
View Full Code Here

        });
        Future<FreeStyleBuild> f = p.scheduleBuild2(0);


        lock.phase(1);
        FreeStyleBuild b = p.getBuildByNumber(1);
        ProgressiveLogClient plc = new ProgressiveLogClient(wc,b);
        // the page should contain some output indicating the build has started why and etc.
        plc.next();

        lock.phase(3);
View Full Code Here

        });
        Future<FreeStyleBuild> f = p.scheduleBuild2(0);

        // discard the initial header portion
        lock.phase(1);
        FreeStyleBuild b = p.getBuildByNumber(1);
        ProgressiveLogClient plc = new ProgressiveLogClient(wc,b);
        plc.next();

        lock.phase(3);
        assertEquals("abc$$$def\r\n",plc.next());
View Full Code Here

    /**
     * script.js defined in the annotator needs to be incorporated into the console page.
     */
    public void testScriptInclusion() throws Exception {
        FreeStyleProject p = createFreeStyleProject();
        FreeStyleBuild b = buildAndAssertSuccess(p);

        HtmlPage html = createWebClient().getPage(b, "console");
        // verify that there's an element inserted by the script
        assertNotNull(html.getElementById("inserted-by-test1"));
        assertNotNull(html.getElementById("inserted-by-test2"));
View Full Code Here

                listener.getLogger().println("<b>&amp;</b>");
                return true;
            }
        });

        FreeStyleBuild b = buildAndAssertSuccess(p);
        HtmlPage html = createWebClient().getPage(b, "console");
        String text = html.asText();
        System.out.println(text);
        assertTrue(text.contains("<b>&amp;</b>"));
        assertTrue(b.getLog().contains("<b>&amp;</b>"));
    }
View Full Code Here

                listener.getLogger().println("<http://www.kohsuke.org/>");
                listener.getLogger().println("<a href='http://www.oracle.com/'>");
                return true;
            }
        });
        FreeStyleBuild b = buildAndAssertSuccess(p);

        HtmlPage c = createWebClient().getPage(b, "console");
        String rsp = c.getWebResponse().getContentAsString();
        assertTrue(rsp, rsp.contains("<a href='http://www.sun.com/'>http://www.sun.com/</a>"));
        assertTrue(rsp, rsp.contains("<a href='http://www.kohsuke.org/'>http://www.kohsuke.org/</a>"));
View Full Code Here

        assertFalse(p.scheduleBuild(new SCMTriggerCause("Second poll")));
        assertFalse(p.scheduleBuild(new SCMTriggerCause("Third poll")));

        // Wait for 2nd build to finish
        buildShouldComplete.signal();
        FreeStyleBuild build = fb.get();

        List<BuildAction> ba = build.getActions(BuildAction.class);

        assertFalse("There should only be one BuildAction.", ba.size()!=1);
    }
View Full Code Here

    buildAndAssertSuccess(matrixProject);
    waitUntilNoActivity();
   
    RunList<FreeStyleBuild> builds = freestyleProject.getBuilds();
    assertEquals("There should only be one FreestyleBuild", 1, builds.size());
    FreeStyleBuild build = builds.iterator().next();
    assertEquals(Result.SUCCESS, build.getResult());
    List<AbstractProject> downstream = hudson.getDependencyGraph().getDownstream(matrixProject);
    assertTrue(downstream.contains(freestyleProject));   
  }
View Full Code Here

TOP

Related Classes of hudson.model.FreeStyleBuild$RunnerImpl

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.