Some Eclipse Foundation services are deprecated, or will be soon. Please ensure you've read this important communication.
Bug 293500 - Test failures in UIAllTests
Summary: Test failures in UIAllTests
Status: RESOLVED FIXED
Alias: None
Product: e4
Classification: Eclipse Project
Component: UI (show other bugs)
Version: 1.0   Edit
Hardware: All All
: P3 normal (vote)
Target Milestone: 1.0 M2   Edit
Assignee: Project Inbox CLA
QA Contact:
URL: http://download.eclipse.org/e4/downlo...
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2009-10-27 15:52 EDT by Oleg Besedin CLA
Modified: 2009-11-19 11:09 EST (History)
2 users (show)

See Also:


Attachments
Stack trace for MWindowTest#testCreateView() (3.20 KB, text/plain)
2009-10-27 15:52 EDT, Oleg Besedin CLA
no flags Details

Note You need to log in before you can comment on or make changes to this bug.
Description Oleg Besedin CLA 2009-10-27 15:52:47 EDT
Created attachment 150674 [details]
Stack trace for MWindowTest#testCreateView()

Something changed on October 26th and now there are 30+ tests failing in the
UIAllTests.

The first test that fails is testCreateView(), stack trace attached.
Comment 1 Eric Moffatt CLA 2009-10-28 14:33:41 EDT
I'm starting to look at this now, it's likely related to the move to the event broker...
Comment 2 Eric Moffatt CLA 2009-10-28 16:35:47 EDT
Committed in >20091028.

I had removed code that forced widget creation in stacks, leading to the majority of the failures. We're now down to 1 Error (in MSashTest) and 4 failures:

testCreateMenu
testCanExecute

test_SwitchActivePartsInCode (for both the Contacts & e4Photo).

I'll be looking at these tomorrow...
Comment 3 Eric Moffatt CLA 2009-10-29 16:16:23 EDT
Committed in >20091029. I've added extra code to the 'createWorkbenchContext' that will create an EventBroker instance *if* there isn't already one in the Application context.

This is a hack to allow the MSashTest to gain access to the broker when running 'headless'...

Once we clean up the context creation we should make sure we're back to a single broker and that it's at the correct level.
Comment 4 Remy Suen CLA 2009-11-06 08:40:36 EST
There seems to be some cascading effect that's causing the test_SwitchActivePartsInCode tests to fail. If I move the StartupTestSuite suite to the top it's okay. If it's second place then they fail.
Comment 5 Paul Webster CLA 2009-11-13 08:49:17 EST
We're still at 3 test failures heading into M2
PW
Comment 6 Remy Suen CLA 2009-11-13 08:58:51 EST
I've moved StartupTestSuite to the top for now. We'll see whether this "helps" on this test machine or not.
Comment 7 Remy Suen CLA 2009-11-16 09:13:04 EST
(In reply to comment #6)
> I've moved StartupTestSuite to the top for now. We'll see whether this "helps"
> on this test machine or not.

Well, it went down to 1. :o
http://download.eclipse.org/e4/downloads/drops/I20091115-2100/results/html/org.eclipse.e4.ui.tests_linux.gtk.ppc.html
Comment 8 Eric Moffatt CLA 2009-11-17 16:04:49 EST
Committed in >20091117. Refactored the PRE to have @PostConstruct and @PreDestroy bookends to ensure that the two subscriptions it makes are unsubscribed.

Note that I've opened Bug 295391 to see whether we can handle this on the user's behalf (since I think most naive clients *will* forget).
Comment 10 Remy Suen CLA 2009-11-18 08:16:25 EST
Before I forget (since I already forgot once and had to debug again), the NPEs in the setInput method is because the client object has been uninjected (and 'uiItem' has been reset to null). The reason this is _not_ observed when you actually run the photo demo and close it is because PRE's stop() method will simply dispose and unbind the widgets without disposing the context. I could easily just add a null check but it's not clear to me if this is the pattern I should be using. Seems strange from a client point of view but maybe that's just me?
Comment 11 Paul Webster CLA 2009-11-18 09:14:01 EST
We're down to 2 test failures:
org.eclipse.e4.ui.tests.application.UIContactsDemoTest.test_SwitchActivePartsInCode and org.eclipse.e4.ui.tests.application.UIContactsDemoTest.test_SwitchActivePartsInCode2

PW
Comment 12 Remy Suen CLA 2009-11-18 09:33:22 EST
(In reply to comment #11)
> We're down to 2 test failures:
> org.eclipse.e4.ui.tests.application.UIContactsDemoTest.test_SwitchActivePartsInCode
> and
> org.eclipse.e4.ui.tests.application.UIContactsDemoTest.test_SwitchActivePartsInCode2

I have wiped those from the tests (literally deleted). The code tests that switching the active child alters the active part chain in the context. Changing the active child should _not_ switch the active part, it is more like a "bring to top" request. A variant of these may be revived at a later stage.