lastStable = new File(job.getRootDir(), "lastStable");
// First build creates links
assertSymlinkForBuild(lastSuccessful, 1);
assertSymlinkForBuild(lastStable, 1);
// Archive artifacts that don't exist to create failure in post-build action
job.getPublishersList().add(new ArtifactArchiver("*.foo", "", false));
build = job.scheduleBuild2(0, new Cause.UserCause()).get();
assertEquals(Result.FAILURE, build.getResult());
// Links should not be updated since build failed
assertSymlinkForBuild(lastSuccessful, 1);
assertSymlinkForBuild(lastStable, 1);