Skip to content
Permalink
Browse files

Merge pull request #31 from pauxus/JENKINS-14685-fixed-testcases

Corrected Unit Tests for JENKINS-14685
  • Loading branch information...
kutzi committed Jan 17, 2013
2 parents e23fff3 + a4b1b19 commit a169a06ec7c551052e5376dfbf3c9f593523645d
Showing with 23 additions and 6 deletions.
  1. +23 −6 src/test/java/hudson/scm/SubversionSCMTest.java
@@ -933,24 +933,41 @@ public void testIgnorePropertyOnlyDirChanges() throws Exception {

boolean foundChanges = p.poll(createTaskListener()).hasChanges();
assertFalse("Property only changes commit should have been ignored.", foundChanges);


p.scheduleBuild2(0).get();
changeProperties("");
addFiles("x", "y");
commitWorkingCopy("meta + files");
commitWorkingCopy("meta + add");

foundChanges = p.poll(createTaskListener()).hasChanges();
assertTrue("Non Property only changes commit should not be ignored.", foundChanges);
assertTrue("Non Property only changes (adds) commit should not be ignored.", foundChanges);

p.scheduleBuild2(0).get();

changeProperties("", "c1");
changeFiles("x", "y", "c1/f2.txt");
commitWorkingCopy("meta + files");

foundChanges = p.poll(createTaskListener()).hasChanges();
assertTrue("Non Property only changes (modify) commit should not be ignored.", foundChanges);

// ignored commit followed by not ignored commit


p.scheduleBuild2(0).get();
changeProperties("");
commitWorkingCopy("meta only");
changeFiles("x", "y");
commitWorkingCopy("files");

foundChanges = p.poll(createTaskListener()).hasChanges();
assertTrue("Non Property only changes commit should not be ignored.", foundChanges);


p.scheduleBuild2(0).get();
changeProperties("c1");
commitWorkingCopy("meta only");

foundChanges = p.poll(createTaskListener()).hasChanges();
assertFalse("Property only changes commit should be ignored.", foundChanges);
}

/**
@@ -988,7 +1005,7 @@ private void changeFiles(String... paths) throws Exception {
SvnClientManager svnm = SubversionSCM.createClientManager((AbstractProject) null);
for (String path : paths) {
FilePath newFile = workingcopy.child(path);
newFile.write("random content","UTF-8");
newFile.write(new Date().toString(),"UTF-8");
}
}

0 comments on commit a169a06

Please sign in to comment.
You can’t perform that action at this time.