* maintained across different progressiveLog calls.
*/
public void testProgressiveOutput() throws Exception {
final SequenceLock lock = new SequenceLock();
WebClient wc = createWebClient();
FreeStyleProject p = createFreeStyleProject();
p.getBuildersList().add(new TestBuilder() {
public boolean perform(AbstractBuild<?, ?> build, Launcher launcher, BuildListener listener) throws InterruptedException, IOException {
lock.phase(0);
// make sure the build is now properly started
lock.phase(2);
listener.getLogger().println("line1");
lock.phase(4);
listener.getLogger().println("line2");
lock.phase(6);
return true;
}
});
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);