Community
Participate
Working Groups
Using a "normal" Ubuntu 11.04 with "Unity" desktop, the SWTBotTableClickTest fails while to works well with Ubuntu 10.10 and Gnome desktop.
I succeed to reproduce this wrong behavior locally on my Ubuntu 10.10, by opening the test case in Eclipse IDE, right-click, Run As > Junit Test
Step-by-step debug gets the test working. I suspect this to be an issue in synchronization that makes that several displays can get created and the RunUIThreadRule does not have the right one.
This branch seems to contain the right fix: https://github.com/mickaelistria/swtbot/tree/362476 See commit https://github.com/mickaelistria/swtbot/commit/455c1ec5f2561add41e0b9117dde7a7f2d36cfdc The issue was indeed that there were 2 Displays instantiated: one by the UIThread, and one by the snippet. Then I replaced code in the test - copying most of the main() method of the snippet - in order to use the current display instead of creating a new one.
(In reply to comment #3) > This branch seems to contain the right fix: > https://github.com/mickaelistria/swtbot/tree/362476 > > See commit > https://github.com/mickaelistria/swtbot/commit/455c1ec5f2561add41e0b9117dde7a7f2d36cfdc > > The issue was indeed that there were 2 Displays instantiated: one by the > UIThread, and one by the snippet. Then I replaced code in the test - copying > most of the main() method of the snippet - in order to use the current display > instead of creating a new one. Would you mind attaching the patch here, and I'll check it in? Thanks!
Can't you merge the branch into the master? There is nothing else than this fix in it.
I made a fix to this fix, available on the same branch, that removes some code to handle event and dispose display, since this is the responsibility of the UIThread.
(In reply to comment #5) > Can't you merge the branch into the master? There is nothing else than this fix > in it. AFAIK, eclipse requires that all changes that land up on master are submitted through bugzilla.
(In reply to comment #5) > Can't you merge the branch into the master? There is nothing else than this fix > in it. (fat fingered previous reply) AFAIK, eclipse requires that all changes that land up on master are submitted through bugzilla. Please attach a patch generated using git format-patch and I'll add it in.
Ok, I'll do that hopefully within a few minutes (tests in progress).
Ketan, I need your help in Git: I have several Git commits for this bug fix. Should I provide one patch for each commit, or is there a way to aggregate patches ?
Created attachment 206427 [details] Patch that avoids creation of multiple Displays
I could not reproduce this issue, and all tests are working well.