Bug 572391 - [test] NPE in FileNewWizardTest
Summary: [test] NPE in FileNewWizardTest
Status: RESOLVED FIXED
Alias: None
Product: OCL
Classification: Modeling
Component: Core (show other bugs)
Version: unspecified   Edit
Hardware: PC Windows 10
: P3 normal (vote)
Target Milestone: ---   Edit
Assignee: OCL Inbox CLA
QA Contact:
URL:
Whiteboard:
Keywords:
Depends on: 572392
Blocks:
  Show dependency tree
 
Reported: 2021-03-29 03:58 EDT by Ed Willink CLA
Modified: 2021-04-12 02:46 EDT (History)
0 users

See Also:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Ed Willink CLA 2021-03-29 03:58:13 EDT
If a test times out the result may be

Exception in thread "Press Finish" java.lang.NullPointerException
	at org.eclipse.ocl.examples.test.xtext.FileNewWizardTest$1$1.run(FileNewWizardTest.java:127)

from

   getShell().getDisplay().asyncExec(new Runnable()

Presumably shell/display mau be null after too long.

?? wasit really too long or is there a problem in ocl-compatibility-2020-06
Comment 1 Ed Willink CLA 2021-03-29 04:09:34 EDT
(In reply to Ed Willink from comment #0)
>>    getShell().getDisplay().asyncExec(new Runnable()
> 
> Presumably shell/display mau be null after too long.

getDisplay() can never be null.

getShell() can never be null wrt the Javadoc but can actually be null post close(). Bug 572392 raised.
Comment 2 Ed Willink CLA 2021-03-29 08:22:19 EDT
(In reply to Ed Willink from comment #0)
> ?? wasit really too long or is there a problem in ocl-compatibility-2020-06

Eventually got a success taking 42 mins rather than the original 30 mins limit, see Bug 572158. All tests from oxygen to 2021-03 pass so there doesn't seem anything fundamentally flaky about FileNewWizardTest "Press Finish"; just bad behaviour if the build time terminates during the wait.
Comment 3 Ed Willink CLA 2021-04-12 02:46:03 EDT
(In reply to Ed Willink from comment #1)
> (> getShell() can never be null wrt the Javadoc but can actually be null post
> close(). Bug 572392 raised.

Javadoc is wrong wrt 20 years of legacy, so all calls to getShell() reviewed to accommodate null / isDisposed().

@Nullable EEA also added but doesn't seem very effective.