Skip to content

Commit

Permalink
Corrected Unit Tests for JENKINS-14685
Browse files Browse the repository at this point in the history
  • Loading branch information
pauxus committed Jan 10, 2013
1 parent d8a267d commit a4b1b19
Showing 1 changed file with 23 additions and 6 deletions.
29 changes: 23 additions & 6 deletions src/test/java/hudson/scm/SubversionSCMTest.java
Expand Up @@ -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);
}

/**
Expand Down Expand Up @@ -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");
}
}

Expand Down

0 comments on commit a4b1b19

Please sign in to comment.