Skip to content
Permalink
Browse files

Corrected Unit Tests for JENKINS-14685

  • Loading branch information...
pauxus committed Jan 10, 2013
1 parent d8a267d commit a4b1b19f49a1c028cd07d0a4e92ec3be17687351
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 a4b1b19

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