DESCRIPTION

Generate and run repository used by UI tests inside test harness

The sample repository for testing clone integration tests is now generated,
has a much smaller size and its daemon is run as part of the test harness
to speedup the UI tests and make them independent from external resources.

Change-Id: I9a0c59dfaa7b02cbada43a89736826d14529f565
Signed-off-by: Douglas Trujillo xxx@xxx.xxx


COMMENTS

author: Douglas Trujillo
date: 2010-05-21 16:12:45.000000000

Uploaded patch set 2.

-------------------------------------
author: Douglas Trujillo
date: 2010-05-21 16:19:00.000000000

Patch Set 2: No score

- works from inside Eclipse 3.6 M7 on windows xp
- still need to test with tycho, fighting (again) with broken downloaded artifacts

-------------------------------------
author: Carlie Harper
date: 2010-05-28 09:01:09.000000000

Patch Set 2: No score; No score

Test fails on Vista, from eclipse 3.5.2 20100218-1602 and from maven.

org.eclipse.swtbot.swt.finder.exceptions.WidgetNotFoundException: Could not find widget.
	at org.eclipse.swtbot.swt.finder.SWTBotFactory.waitUntilWidgetAppears(SWTBotFactory.java:348)
	at org.eclipse.swtbot.swt.finder.SWTBotFactory.shells(SWTBotFactory.java:112)
	at org.eclipse.swtbot.swt.finder.SWTBotFactory.shell(SWTBotFactory.java:102)
	at org.eclipse.swtbot.swt.finder.SWTBotFactory.shell(SWTBotFactory.java:93)
	at org.eclipse.egit.ui.wizards.clone.WorkingCopyPage.waitForCreate(WorkingCopyPage.java:39)
	at org.eclipse.egit.ui.wizards.clone.WorkingCopyPage.assertWorkingCopyExists(WorkingCopyPage.java:53)
	at org.eclipse.egit.ui.wizards.clone.GitCloneWizardTest.clonedRepositoryShouldExistOnFileSystem(GitCloneWizardTest.java:247)
	at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
	at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
	at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
	at java.lang.reflect.Method.invoke(Method.java:597)
	at org.junit.runners.model.FrameworkMethod$1.runReflectiveCall(FrameworkMethod.java:44)
	at org.junit.internal.runners.model.ReflectiveCallable.run(ReflectiveCallable.java:15)
	at org.junit.runners.model.FrameworkMethod.invokeExplosively(FrameworkMethod.java:41)
	at org.junit.internal.runners.statements.InvokeMethod.evaluate(InvokeMethod.java:20)
	at org.junit.internal.runners.statements.RunBefores.evaluate(RunBefores.java:28)
	at org.junit.internal.runners.statements.RunAfters.evaluate(RunAfters.java:31)
	at org.junit.runners.BlockJUnit4ClassRunner.runChild(BlockJUnit4ClassRunner.java:73)
	at org.junit.runners.BlockJUnit4ClassRunner.runChild(BlockJUnit4ClassRunner.java:46)
	at org.junit.runners.ParentRunner.runChildren(ParentRunner.java:180)
	at org.junit.runners.ParentRunner.access$000(ParentRunner.java:41)
	at org.junit.runners.ParentRunner$1.evaluate(ParentRunner.java:173)
	at org.junit.internal.runners.statements.RunBefores.evaluate(RunBefores.java:28)
	at org.junit.internal.runners.statements.RunAfters.evaluate(RunAfters.java:31)
	at org.junit.runners.ParentRunner.run(ParentRunner.java:220)
	at org.eclipse.swtbot.swt.finder.junit.SWTBotJunit4ClassRunner.run(SWTBotJunit4ClassRunner.java:54)
	at org.junit.runners.Suite.runChild(Suite.java:115)
	at org.junit.runners.Suite.runChild(Suite.java:23)
	at org.junit.runners.ParentRunner.runChildren(ParentRunner.java:180)
	at org.junit.runners.ParentRunner.access$000(ParentRunner.java:41)
	at org.junit.runners.ParentRunner$1.evaluate(ParentRunner.java:173)
	at org.junit.internal.runners.statements.RunBefores.evaluate(RunBefores.java:28)
	at org.junit.internal.runners.statements.RunAfters.evaluate(RunAfters.java:31)
	at org.junit.runners.ParentRunner.run(ParentRunner.java:220)
	at org.eclipse.jdt.internal.junit4.runner.JUnit4TestReference.run(JUnit4TestReference.java:46)
	at org.eclipse.jdt.internal.junit.runner.TestExecution.run(TestExecution.java:38)
	at org.eclipse.jdt.internal.junit.runner.RemoteTestRunner.runTests(RemoteTestRunner.java:467)
	at org.eclipse.jdt.internal.junit.runner.RemoteTestRunner.runTests(RemoteTestRunner.java:683)
	at org.eclipse.jdt.internal.junit.runner.RemoteTestRunner.run(RemoteTestRunner.java:390)
	at org.eclipse.swtbot.eclipse.core.RemotePluginTestRunner.main(RemotePluginTestRunner.java:64)
	at org.eclipse.swtbot.eclipse.core.UITestApplication.runTests(UITestApplication.java:117)
	at org.eclipse.ui.internal.testing.WorkbenchTestable$1.run(WorkbenchTestable.java:71)
	at java.lang.Thread.run(Thread.java:619)
Caused by: org.eclipse.swtbot.swt.finder.widgets.TimeoutException: Timeout after: 5000 ms.: Could not find shell matching: with text 'Cloning from git://localhost:62438/test.git'
	at org.eclipse.swtbot.swt.finder.SWTBotFactory.waitUntil(SWTBotFactory.java:398)
	at org.eclipse.swtbot.swt.finder.SWTBotFactory.waitUntil(SWTBotFactory.java:372)
	at org.eclipse.swtbot.swt.finder.SWTBotFactory.waitUntil(SWTBotFactory.java:360)
	at org.eclipse.swtbot.swt.finder.SWTBotFactory.waitUntilWidgetAppears(SWTBotFactory.java:346)
	... 42 more

-------------------------------------
author: Juliet Cantu
date: 2010-05-28 11:19:34.000000000

Patch Set 2: No score; No score

Same failure and 

canCloneARemoteRepo
Caused by: org.eclipse.swtbot.swt.finder.widgets.TimeoutException: Timeout after: 10000 ms.: Could not find shell matching: with text 'Cloning from git://localhost:33562/test.git'


clonedRepositoryShouldExistOnFileSystem
Caused by: org.eclipse.swtbot.swt.finder.widgets.TimeoutException: Timeout after: 10000 ms.: Could not find shell matching: with text 'Cloning from git://localhost:33562/test.git'

alteringSomeParametersDuringClone
Caused by: org.eclipse.swtbot.swt.finder.widgets.TimeoutException: Timeout after: 10000 ms.: Could not find shell matching: with text 'Cloning from git://localhost:33562/test.git'

shareProjectWithNewlyCreatedRepo
aused by: org.eclipse.swtbot.swt.finder.widgets.TimeoutException: Timeout after: 10000 ms.: Could not find widget matching: (of type 'Table')

The last one is probably not related to this patch, but the
other probably are. Using a very small local repo means the clone operation is way fast for the test to detect the progress indicator.

-------------------------------------
author: Douglas Trujillo
date: 2010-05-28 12:58:12.000000000

Patch Set 2:

Robin: do you think we should instead use the approach taken in SampleDataRepositoryTestCase and checkin the pack files for e.g. egit.git to have some more test data to give swtbot a chance to find the widgets

-------------------------------------
author: Juliet Cantu
date: 2010-05-29 10:21:32.000000000

Patch Set 2:

Some ideas
- Slow down the cloning with the same daya. I've used AspectJ in another project where mocking would be too intrusive to test some legacy code. Introducing a few delays would be easy.
- Create a test repo from EGit, by cloning ourself and fixing the branches. That would give us a large repo for testing. Remember we are not testing cloning itself, but only the GUI on top of clone, so we can presume that cloning as such is working.

-------------------------------------
