use of de.dagere.peass.vcs.VersionIterator in project peass by DaGeRe.
the class SuperclassDetectorIT method testSuperclassChange.
@Test
public void testSuperclassChange() throws IOException, InterruptedException, XmlPullParserException, ParseException, ViewNotFoundException, ClassNotFoundException, InstantiationException, IllegalAccessException, IllegalArgumentException, InvocationTargetException, NoSuchMethodException, SecurityException {
final File secondVersion = new File(VERSIONS_FOLDER, "superclass_changed");
final Map<ChangedEntity, ClazzChangeData> changes = new TreeMap<>();
changes.put(new ChangedEntity("defaultpackage.NormalSuperclass", ""), new ClazzChangeData("defaultpackage.NormalSuperclass", false));
final ChangeManager changeManager = Mockito.mock(ChangeManager.class);
Mockito.when(changeManager.getChanges(Mockito.any())).thenReturn(changes);
final VersionIterator fakeIterator = new FakeFileIterator(DependencyTestConstants.CURRENT, Arrays.asList(secondVersion));
final DependencyReader reader = new DependencyReader(DependencyTestConstants.DEFAULT_CONFIG_NO_VIEWS, new PeassFolders(DependencyTestConstants.CURRENT), DependencyTestConstants.NULL_RESULTS_FOLDERS, null, fakeIterator, changeManager, new ExecutionConfig(5), new KiekerConfig(true), new EnvironmentVariables());
reader.readInitialVersion();
checkInitialDependencies(reader);
fakeIterator.goToNextCommit();
reader.analyseVersion(changeManager);
checkFirstVersionDependencies(reader);
}
use of de.dagere.peass.vcs.VersionIterator in project peass by DaGeRe.
the class DependencyParallelReader method processCommits.
void processCommits(final ResultsFolders currentOutFolders, final ExecutorService service, final PeassFolders foldersTemp, final List<GitCommit> currentCommits, final List<GitCommit> reserveCommits, final GitCommit minimumCommit) throws InterruptedException {
LOG.debug("Start: {} End: {}", currentCommits.get(0), currentCommits.get(currentCommits.size() - 1));
LOG.debug(currentCommits);
final VersionIterator iterator = new VersionIteratorGit(foldersTemp.getProjectFolder(), currentCommits, null);
FirstRunningVersionFinder finder = new FirstRunningVersionFinder(foldersTemp, nonRunning, iterator, executionConfig, env);
final DependencyReader reader = new DependencyReader(dependencyConfig, foldersTemp, currentOutFolders, url, iterator, nonChanges, executionConfig, kiekerConfig, env);
final VersionIteratorGit reserveIterator = new VersionIteratorGit(foldersTemp.getProjectFolder(), reserveCommits, null);
final Runnable current = new OneReader(minimumCommit, reserveIterator, reader, finder);
service.submit(current);
Thread.sleep(5);
}
Aggregations