Community
Participate
Working Groups
Since https://hudson.eclipse.org/hudson/job/emffacet-nightly/lastCompletedBuild/ org.eclipse.emf.facet.widgets.nattable.tests.NatTableAPITests.selectAllTest org.eclipse.emf.facet.widgets.nattable.tests.NatTableAPITests.saveTest org.eclipse.emf.facet.widgets.nattable.tests.NatTableAPITests.selectRowsTest org.eclipse.emf.facet.widgets.nattable.tests.NatTableAPITests.getSelectionChangedListenersTest org.eclipse.emf.facet.widgets.nattable.tests.NatTableAPITests.setHideEmptyColumnsTest org.eclipse.emf.facet.widgets.nattable.tests.NatTableAPITests.testSortColumnsByType org.eclipse.emf.facet.widgets.nattable.tests.NatTableAPITests.testGetInstantiationMethodHistory
I can reproduce the error in may development environment.
If I remove the "(timeout = NatTableAPITests.TIMEOUT)" introduced by in revision 1151 (Bug 364693), the tests run properly.
Created attachment 208077 [details] Fix patch Here is a path to fixing this bug (in my development environment). I had to change some code lines in existing unit test. Please, can anybody review those modifications? I know that other committers are really busy that why to fix the build I’ll commit this batch without waiting the code review. The adding of a "(timeout = NatTableAPITests.TIMEOUT)" in the @test annotation implies the execution of the test in a different thread than the test one. Since the adding of "(timeout = NatTableAPITests.TIMEOUT)", the tests designed to be executed in the UI thread were executed in a non UI thread. This explains the "Invalid thread access" erros. To solve this problem, I’ve written a new class (SynchronizedNatTableWidget) which implements INatTableWidget, INatTableWidget2 and INatTableWidgetInternal. This class checks if it is called in the UI thread and call the class NatTableWidget within a Display.syncExec(), if needed. The class NatTableWidget was called by others plug-ins. I had to fix that by replacing the uses of NatTableWidget by uses of INatTableWidgetInternal. I’ve also moved some test classes from the AllTest test suite to the AllUITeest one because - if we run a test in the UI thread - and if the UI tread test creates a timeout threads - and if the code executed in timeout thread the call a SynchronizedNatTableWidget method => this will cause a dead lock because the NatTable widget will be executed in a syncExec (the calling thread is not the UI thread) and this syncExec will have to wait the end of the unit test task executed by the UI thread. Here is the dead lock.
Comment on attachment 208077 [details] Fix patch I've committed this patch. (Committed revision 1248.) Let's wait the next build.
The NatTableAPITests's unit test are back to normal in the following builds: - https://hudson.eclipse.org/hudson/job/emffacet-nightly-3.8/16/ - https://hudson.eclipse.org/hudson/job/emffacet-nightly/647/
*** Bug 365078 has been marked as a duplicate of this bug. ***
Can be closed.