Patch Set 5:

I do not get errors in GitResourceVariantTreeSubscriberTest.
What kind of errors do you get?

However, I sporadically get errors like pasted below, but not only on Synchronize tests and also without this change.

Contains: Error deleting resource '/Project-1' from the workspace tree.
org.eclipse.core.internal.resources.ResourceException: Could not delete metadata for '/Project-1'.
	at org.eclipse.core.internal.resources.LocalMetaArea.delete(LocalMetaArea.java:101)
	at org.eclipse.core.internal.resources.Project.deleteResource(Project.java:345)
	at org.eclipse.core.internal.resources.ResourceTree.deletedProject(ResourceTree.java:169)
	at org.eclipse.core.internal.resources.ResourceTree.internalDeleteProject(ResourceTree.java:438)
	at org.eclipse.core.internal.resources.ResourceTree.standardDeleteProject(ResourceTree.java:837)
	at org.eclipse.core.internal.resources.Resource.unprotectedDelete(Resource.java:1942)
	at org.eclipse.core.internal.resources.Resource.delete(Resource.java:786)
	at org.eclipse.core.internal.resources.Project.delete(Project.java:331)
	at org.eclipse.egit.core.test.TestProject.dispose(TestProject.java:138)
	at org.eclipse.egit.core.test.GitTestCase.tearDown(GitTestCase.java:51)

and 
java.io.IOException: C:\Users\D044495\Documents\NWDS\workspaces\junit-workspace\.git\refs in use or undeletable
	at org.eclipse.egit.core.test.TestUtils.deleteRecursive(TestUtils.java:55)
	at org.eclipse.egit.core.test.TestUtils.deleteRecursive(TestUtils.java:49)
	at org.eclipse.egit.core.test.GitTestCase.tearDown(GitTestCase.java:52)
	at org.eclipse.egit.core.test.op.ResetOperationTest.tearDown(ResetOperationTest.java:55)