Examples of DumbSlave


Examples of hudson.slaves.DumbSlave

      }
    }

    public DumbSlave createSlave(String nodeName, String labels, EnvVars env) throws Exception {
        synchronized (hudson) {
            DumbSlave slave = new DumbSlave(nodeName, "dummy",
            createTmpDir().getPath(), "1", Node.Mode.NORMAL, labels==null?"":labels, createComputerLauncher(env), RetentionStrategy.NOOP, Collections.EMPTY_LIST);
        hudson.addNode(slave);
        return slave;
      }
    }
View Full Code Here

Examples of hudson.slaves.DumbSlave

                                                unregister();
                                            }
                                        };
        waiter.register();

        DumbSlave s = createSlave(l, env);
        latch.await();

        return s;
    }
View Full Code Here

Examples of hudson.slaves.DumbSlave

    }


    @LocalData
    public void testSlave() throws Exception {
        DumbSlave s = createOnlineSlave();
        project.setAssignedLabel(s.getSelfLabel());

        FilePath src = new FilePath(hudson.getRootPath(), "jobs/" + BASIC_TEST_PROJECT + "/workspace/");
        assertNotNull(src);
        FilePath dest = s.getWorkspaceFor(project);
        assertNotNull(dest);
        src.copyRecursiveTo("*.xml", dest);

        testBasic();
    }
View Full Code Here

Examples of hudson.slaves.DumbSlave

        HtmlForm form = client.goTo("computer/configure").getFormByName("config");
        submit(form);
    }

    public void testNodeOfflineCli() throws Exception {
        DumbSlave s = createSlave();

        CLI cli = new CLI(getURL());
        try {
            assertTrue(cli.execute("wait-node-offline","xxx")!=0);
            assertTrue(cli.execute("wait-node-online",s.getNodeName())==0);

            s.toComputer().disconnect().get();

            assertTrue(cli.execute("wait-node-offline",s.getNodeName())==0);
        } finally {
            cli.close();
        }
    }
View Full Code Here

Examples of hudson.slaves.DumbSlave

        browsers.add(new HTMLUnitBrowser(10));

        CustomWDConfiguration cc = new CustomWDConfiguration(5001, -1, browsers, null);
        getPlugin().getGlobalConfigurations().add(new SeleniumGlobalConfiguration("test", new NodeLabelMatcher("foolabel"), cc));
        // HtmlPage newSlave = submit(new WebClient().goTo("configure").getFormByName("config"));
        DumbSlave slave = new DumbSlave("foo", "dummy", createTmpDir().getPath(), "1", Mode.NORMAL, "foolabel", createComputerLauncher(null),
                RetentionStrategy.NOOP, new ArrayList<NodeProperty<Node>>());
        hudson.addNode(slave);

        waitForRC();
View Full Code Here

Examples of hudson.slaves.DumbSlave

        getPlugin().getGlobalConfigurations().add(new SeleniumGlobalConfiguration("test", new NodeLabelMatcher("foolabel"), cc));
        Mailer.descriptor().setHudsonUrl(getURL().toExternalForm());

        // HtmlPage newSlave = submit(new WebClient().goTo("configure").getFormByName("config"));
        DumbSlave slave = new DumbSlave("foo", "dummy", createTmpDir().getPath(), "1", Mode.NORMAL, "foolabel", createComputerLauncher(null),
                RetentionStrategy.NOOP, new ArrayList<NodeProperty<Node>>());

        hudson.addNode(slave);

        waitForRC();
View Full Code Here

Examples of hudson.slaves.DumbSlave

        }
        return lenght;
    }
   
    protected static Slave createSlave(String name, String remoteFS, Jenkins jenkins, ComputerLauncher launcher) throws Exception{
        DumbSlave slave = new DumbSlave(name, "dummy",
            remoteFS, "2", Mode.NORMAL, "", launcher,
            RetentionStrategy.NOOP, Collections.<NodeProperty<?>>emptyList());
      jenkins.addNode(slave);
        while(slave.toComputer()==null || !slave.toComputer().isOnline()){
            Thread.sleep(100);
        }
        return slave;
    }
View Full Code Here

Examples of hudson.slaves.DumbSlave

        }
        return length;
    }
   
    private Slave createSlave(String name, String remoteFS) throws Exception{
        DumbSlave slave = new DumbSlave(name, "dummy",
            remoteFS, "2", Mode.NORMAL, "", createComputerLauncher(null),
            RetentionStrategy.NOOP, Collections.<NodeProperty<?>>emptyList());
      hudson.addNode(slave);
        while(slave.toComputer()==null || !slave.toComputer().isOnline()){
            Thread.sleep(100);
        }
        return slave;
    }
View Full Code Here

Examples of hudson.slaves.DumbSlave

     * Tests that a metadata configuration is still there after someone saves a page.
     *
     * @throws Exception if so.
     */
    public void testConfigRoundtrip() throws Exception {
        DumbSlave slave = createSlave();
        String name = slave.getNodeName();
        MetadataNodeProperty property = new MetadataNodeProperty(new LinkedList<MetadataValue>());
        slave.getNodeProperties().add(property);
        TreeStructureUtil.addValue(property, "test", "description", "some", "kind", "of", "path");

        this.configRoundtrip(slave);

        Node node = Hudson.getInstance().getNode(name);
View Full Code Here

Examples of hudson.slaves.DumbSlave

        assertTrue(b.getWorkspace().child("Node.java").exists());
    }

    @Url("http://hudson.pastebin.com/m3ea34eea")
    public void testRemoteCheckOut() throws Exception {
        DumbSlave s = createSlave();
        FreeStyleProject p = createFreeStyleProject();
        p.setAssignedLabel(s.getSelfLabel());
        p.setScm(new SubversionSCM("https://svn.jenkins-ci.org/trunk/hudson/test-projects/trivial-ant/"));

        FreeStyleBuild b = assertBuildStatusSuccess(p.scheduleBuild2(0, new Cause.UserIdCause()).get());
        assertTrue(b.getWorkspace().child("build.xml").exists());
        assertBuildStatusSuccess(p.scheduleBuild2(0).get());
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.