diff options
author | Matthias Sohn | 2019-09-23 20:41:17 +0000 |
---|---|---|
committer | Thomas Wolf | 2019-10-10 19:57:36 +0000 |
commit | 110b54a5ffd44b1151328abbac4cdd8ccbd3ee50 (patch) | |
tree | 4ceff340a966a12503439ac73501aced74bea58e /org.eclipse.egit.core.test | |
parent | 9e7e288f0489e8f92883d1ac8d419ae87b6d000e (diff) | |
download | egit-110b54a5ffd44b1151328abbac4cdd8ccbd3ee50.tar.gz egit-110b54a5ffd44b1151328abbac4cdd8ccbd3ee50.tar.xz egit-110b54a5ffd44b1151328abbac4cdd8ccbd3ee50.zip |
Rely on synchronous ResourceRefreshHandler to refresh after checkout
- Convert asynchronous ResourceRefreshJob to a synchronous
ResourceRefreshHandler.
- Move it to EGit core since it does not depend on the UI.
- Remove merging of multiple WorkingTreeChanges and progress monitors
since that's not necessary when refreshing synchronously.
- Unconditionally refresh resources found, even when in projects not
shared with EGit.
Bug: 551289
Change-Id: I338e4eff366bf2300e347a1da00c2ab0eee6bc14
Signed-off-by: Matthias Sohn <matthias.sohn@sap.com>
Signed-off-by: Thomas Wolf <thomas.wolf@paranor.ch>
Diffstat (limited to 'org.eclipse.egit.core.test')
-rw-r--r-- | org.eclipse.egit.core.test/src/org/eclipse/egit/core/internal/util/ProjectUtilTest.java | 14 |
1 files changed, 2 insertions, 12 deletions
diff --git a/org.eclipse.egit.core.test/src/org/eclipse/egit/core/internal/util/ProjectUtilTest.java b/org.eclipse.egit.core.test/src/org/eclipse/egit/core/internal/util/ProjectUtilTest.java index 3c221e0af9..0bb7de7f28 100644 --- a/org.eclipse.egit.core.test/src/org/eclipse/egit/core/internal/util/ProjectUtilTest.java +++ b/org.eclipse.egit.core.test/src/org/eclipse/egit/core/internal/util/ProjectUtilTest.java @@ -16,10 +16,9 @@ import static org.junit.Assert.assertFalse; import static org.junit.Assert.assertNull; import static org.junit.Assert.assertThat; import static org.junit.Assert.assertTrue; -import static org.mockito.Matchers.any; -import static org.mockito.Matchers.eq; +import static org.mockito.ArgumentMatchers.any; +import static org.mockito.ArgumentMatchers.eq; import static org.mockito.Mockito.mock; -import static org.mockito.Mockito.spy; import static org.mockito.Mockito.verify; import java.io.ByteArrayInputStream; @@ -196,15 +195,6 @@ public class ProjectUtilTest extends GitTestCase { } @Test - public void testRefreshValidProjects() throws Exception { - IProject p = spy(project.getProject()); - IProject[] projects = { p }; - ProjectUtil.refreshValidProjects(projects, new NullProgressMonitor()); - verify(p).refreshLocal(eq(IResource.DEPTH_INFINITE), - any(IProgressMonitor.class)); - } - - @Test public void testCloseMissingProject() throws Exception { IProject p = mock(IProject.class); File projectFile = project.getProject().getLocation() |