DESCRIPTION

Test stability: GitRepositoriesView tests

Test failure in [1] claimed that no refresh job was scheduled.

The RepositoriesView schedules a refresh on its own in response to an
index diff change. If a refresh job is already scheduled and not
running yet, the re-schedule in view.refresh() has no effect. See
JobManager.schedule(). As a result, the JobListener is never notified
about a scheduled job.

Moreover, if the job is already running, re-scheduling will make it run
again, but the JobListener will return already when the currently
running job finishes.

Therefore, we first need to join() potentially already scheduled
refresh jobs to be sure that view.refresh() really schedules a job
that we can then wait for.

[1] https://hudson.eclipse.org/egit/job/egit.gerrit/8154/testReport/junit/org.eclipse.egit.ui.view.repositories/GitRepositoriesViewBranchHandlingTest/testCheckoutRemote/

Change-Id: I2ecd20b4caaf70e00a903366f46da0075afa6a3f
Signed-off-by: Alayna Houston xxx@xxx.xxx


COMMENTS

author: Alayna Houston
date: 2016-02-21 11:49:24.000000000

Uploaded patch set 1.

-------------------------------------
author: Brenden Conley
date: 2016-02-21 12:19:19.000000000

Patch Set 1:

Build Started https://hudson.eclipse.org/egit/job/egit.gerrit/8156/

-------------------------------------
author: Brenden Conley
date: 2016-02-21 12:46:55.000000000

Patch Set 1: Verified+1

Build Successful 

https://hudson.eclipse.org/egit/job/egit.gerrit/8156/ : SUCCESS

-------------------------------------
author: Alayna Houston
date: 2016-02-21 13:08:06.000000000

Patch Set 1:

(1 comment)

Line:119, org.eclipse.egit.ui.test/src/org/eclipse/egit/ui/view/repositories/GitRepositoriesViewTestBase.java -> Not quite correct yet. There's still a small window between lines 119 and 120 where the asynchronous index diff update might schedule a refresh.

-------------------------------------
author: Gerrit Johnathan Pham
date: 2016-02-21 21:09:14.000000000

Change has been successfully merged into the git repository by Alayna Houston

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