Package hudson.util

Examples of hudson.util.OneShotEvent.signal()


        FreeStyleProject p = createFreeStyleProject();
        p.getBuildersList().add(new TestBuilder() {
            @Override
            public boolean perform(AbstractBuild<?, ?> build, Launcher launcher, BuildListener listener) throws InterruptedException, IOException {
                e.signal(); // we are safe to be interrupted
                synchronized (this) {
                    wait();
                }
                throw new AssertionError();
            }
View Full Code Here


            // add a bit of delay to make sure that the blockage is happening
            Thread.sleep(3000);

            // release the polling
            sync.signal();

            FreeStyleBuild b2 = assertBuildStatusSuccess(f);

            // they should have used the same workspace.
            assertEquals(b1.getWorkspace(), b2.getWorkspace());
View Full Code Here

        assertFalse(project.scheduleBuild(new RemoteCause("1.2.3.4", "foo")));
        assertFalse(project.scheduleBuild(new SCMTriggerCause("")));
        assertFalse(project.scheduleBuild(new TimerTriggerCause()));

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

        // Make sure proper folding happened.
        CauseAction ca = build.getAction(CauseAction.class);
        assertNotNull(ca);
View Full Code Here

        assertFalse(p.scheduleBuild(new SCMTriggerCause("First poll")));
        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

TOP
Copyright © 2018 www.massapi.com. 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.