-
Bug
-
Resolution: Fixed
-
Major
-
None
-
Platform: All, OS: All
Hi!
I've been running the latest code from trunk and have found an issue. When
Hudson calls pollChanges it always results in false saying that no changes are
detected. I've been doing som debugging and found that since I don't have any
excludedRegions defined the FileFilter will always vote for false resulting in
no detected changes.
The UCMHistoryActionTest are missing a test that uses the actual Filters that a
real Hudosn will be running. When i added the same filters as is created in
ClearCaseSCM.java (method configureFilters) to the assertSuccessfulParse test it
fails.
@Test
public void assertSuccessfulParse() throws Exception {
context.checking(new Expectations() {
{
one(cleartool).lshistory(with(aNonNull(String.class)),
with(aNull(Date.class)), with(equal("view")),
with(equal("branch")),
with(equal(new String[]
will(returnValue(new StringReader("\"20071015.151822\" \"username\"
\"Customer\\DataSet.xsd\" \"\\main\\sit_r6a\\1\" \"create version\" \"mkelem\"
\"activity\" "
+ "\"20071015.151822\" \"username\" \"Customer\\DataSet.xsd\"
\"\\main\\sit_r6a\\2\" \"create version\" \"mkelem\" \"activity\" ")));
}
});
List<Filter> filters = new ArrayList<Filter>();
filters.add(new DefaultFilter());
filters.add(new FileFilter(FileFilter.Type.DoesNotContainRegxp, ""));
UcmHistoryAction action = new UcmHistoryAction(cleartool, filters);
boolean hasChange = action.hasChanges(null, "view",
new String[] { "branch" }, new String[] { "vobpath" }
);
assertTrue("The getChanges() method did not report a change", hasChange);
context.assertIsSatisfied();
}
I don't have any proposed solution but would appreciate if someone that has
implemented the excludedRegions functionalliy could take a look at this.