Package hudson

Examples of hudson.BulkChange.abort()


            f.get(30, TimeUnit.SECONDS); // if it's taking too long, abort.

            // since there's only one job, we expect there to be just one slave
            assertEquals(1,cloud.numProvisioned);
        } finally {
            bc.abort();
        }
    }

    /**
     * Scenario: we got a lot of jobs all of the sudden, and we need to fire up a few nodes.
View Full Code Here


            // the time it takes to complete a job is eternally long compared to the time it takes to launch
            // a new slave, so in this scenario we end up allocating 5 slaves for 5 jobs.
            assertEquals(5,cloud.numProvisioned);
        } finally {
            bc.abort();
        }
    }

    /**
     * Scenario: make sure we take advantage of statically configured slaves.
View Full Code Here

            verifySuccessfulCompletion(buildAll(create5SlowJobs(new Latch(5))));

            // we should have used two static slaves, thus only 3 slaves should have been provisioned
            assertEquals(3,cloud.numProvisioned);
        } finally {
            bc.abort();
        }
    }

    /**
     * Scenario: loads on one label shouldn't translate to load on another label.
View Full Code Here

            // and all blue jobs should be still stuck in the queue
            for (Future<FreeStyleBuild> bb : blueBuilds)
                assertFalse(bb.isDone());
        } finally {
            bc.abort();
        }
    }


    private FreeStyleProject createJob(Builder builder) throws IOException {
View Full Code Here

        try {
            JSONObject json = req.getSubmittedForm();
            submit(json);
            bc.commit();
        } finally {
            bc.abort();
        }
        return HttpResponses.redirectToDot();
    }

    protected void submit(JSONObject json) throws IOException {
View Full Code Here

                        save();
                        bc.commit();
                    } catch (IOException e) {
                        LOGGER.log(Level.WARNING, "Could not migrate stored credentials", e);
                    } finally {
                        bc.abort();
                    }
                } finally {
                    SecurityContextHolder.setContext(oldContext);
                }
            }
View Full Code Here

        try {
            JSONObject json = req.getSubmittedForm();
            submit(json);
            bc.commit();
        } finally {
            bc.abort();
        }
        return HttpResponses.redirectToDot();
    }

    protected void submit(JSONObject json) throws IOException {
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.