Skip to main content
summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorAxel Richard2015-01-26 15:34:24 -0500
committerAxel Richard2015-01-26 15:35:32 -0500
commite2f2d7f7f555f807c483aa92a86b4b20bef466af (patch)
tree4c3f80530a2b0fedb90eb3714b5425697f39d2ed /performance
parent46245d3e38cc29a07d684f105b4801739e8cbe35 (diff)
downloadorg.eclipse.emf.compare-e2f2d7f7f555f807c483aa92a86b4b20bef466af.tar.gz
org.eclipse.emf.compare-e2f2d7f7f555f807c483aa92a86b4b20bef466af.tar.xz
org.eclipse.emf.compare-e2f2d7f7f555f807c483aa92a86b4b20bef466af.zip
Fix git performances tests
Change-Id: I8be6e984b7e199e3bd58622206ee09827a532c53 Signed-off-by: Axel Richard <axel.richard@obeo.fr>
Diffstat (limited to 'performance')
-rw-r--r--performance/org.eclipse.emf.compare.tests.performance/src/data/models/DataGit.java20
1 files changed, 11 insertions, 9 deletions
diff --git a/performance/org.eclipse.emf.compare.tests.performance/src/data/models/DataGit.java b/performance/org.eclipse.emf.compare.tests.performance/src/data/models/DataGit.java
index d3277e05f..c105c9780 100644
--- a/performance/org.eclipse.emf.compare.tests.performance/src/data/models/DataGit.java
+++ b/performance/org.eclipse.emf.compare.tests.performance/src/data/models/DataGit.java
@@ -90,12 +90,12 @@ public class DataGit {
private Comparison comparison;
- private IProject rootProject;
-
private File repoFile;
private Repository repository;
+ private Collection<IProject> importedProjects;
+
public DataGit(String zippedRepoLocation, String repoName, String rootProjectName, String modelName) {
try {
@@ -111,15 +111,14 @@ public class DataGit {
// Unzip repository to temp directory
GitUtil.unzipRepo(entry, systemTmpDir, new NullProgressMonitor());
- // Import projects into workspace from the repository
- Collection<IProject> importedProjects = GitUtil.importProjectsFromRepo(repoFile);
+ importedProjects = GitUtil.importProjectsFromRepo(repoFile);
// Connect eclipse projects to egit repository
File gitDir = new File(repoFile, Constants.DOT_GIT);
repository = Activator.getDefault().getRepositoryCache().lookupRepository(gitDir);
GitUtil.connectProjectsToRepo(repository, importedProjects);
- rootProject = ResourcesPlugin.getWorkspace().getRoot().getProject(rootProjectName);
+ IProject rootProject = ResourcesPlugin.getWorkspace().getRoot().getProject(rootProjectName);
final IFile model = rootProject.getFile(new Path(modelName));
final String fullPath = model.getFullPath().toString();
@@ -227,11 +226,14 @@ public class DataGit {
resourceSets = null;
try {
- // Close & delete project from workspace
- rootProject.close(new NullProgressMonitor());
- rootProject.delete(false, new NullProgressMonitor());
+ // Close & delete projects from workspace
+ for (IProject project : importedProjects) {
+ project.close(new NullProgressMonitor());
+ project.delete(false, new NullProgressMonitor());
+ }
+ importedProjects.clear();
} catch (CoreException e) {
- System.out.println(e);
+ Throwables.propagate(e);
}
if (repository != null) {

Back to the top