use of de.dagere.peass.dependency.parallel.OneReader in project peass by DaGeRe.
the class TestVersionSplitting method readDummyDependencies.
private void readDummyDependencies(final List<StaticTestSelection> dependencies, final int i, final List<GitCommit> currentCommits, final List<GitCommit> reserveCommits, final GitCommit minimumCommit) throws IOException {
File dummyFolder = new File(TestConstants.CURRENT_FOLDER, "part_" + i);
dummyFolder.mkdir();
File pom = new File(dummyFolder, "pom.xml");
try (BufferedWriter newBufferedWriter = Files.newBufferedWriter(pom.toPath())) {
newBufferedWriter.write("<project></project>");
}
final VersionIterator fakeIterator = new FakeVersionIterator(dummyFolder, currentCommits);
final ChangeManager changeManager = Mockito.mock(ChangeManager.class);
Mockito.when(changeManager.getChanges(Mockito.any())).thenReturn(null);
FirstRunningVersionFinder finder = new FirstRunningVersionFinder(null, null, null, null, null) {
@Override
public boolean searchFirstRunningCommit() {
return true;
}
};
DummyReader dummy = new DummyReader(dummyFolder, fakeIterator, changeManager);
System.out.println(minimumCommit.getTag());
final VersionIterator reserveIterator = new FakeVersionIterator(dummyFolder, reserveCommits);
OneReader reader = new OneReader(minimumCommit, reserveIterator, dummy, finder);
reader.run();
dependencies.add(dummy.getDependencies());
}
use of de.dagere.peass.dependency.parallel.OneReader 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