Skip to main content


Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Eclipse Projects » Remote Application Platform (RAP) » Testing RAP works via junit not via tycho => invalid thread acces (FIXED)
Testing RAP works via junit not via tycho => invalid thread acces (FIXED) [message #1744825] Fri, 30 September 2016 15:04 Go to next message
Wim Anckaert is currently offline Wim AnckaertFriend
Messages: 32
Registered: December 2012
Member
Dear,

I'm trying to test our RAP application with the rule TestContext.
I have problems when there are multiple tests when build with tycho.

It runs fine in eclipse with Junit plug-in test.
But run with tycho I get a org.eclipse.swt.SWTException: Invalid thread access.

To reproduce see attachment 3 projects:
1. project ...parent : pom.xml -> maven install
2. project ...parent : pom.xml -> maven build
-- goals : -U clean install
-- Profiles : eu.tailorfit

It runs fine when there is only 1 test with
@Rule
public TestContext context = new TestContext();

Kind regards.

[Updated on: Sat, 01 October 2016 13:02]

Report message to a moderator

Re: Testing RAP works via junit not via tycho => invalid thread acces [message #1744886 is a reply to message #1744825] Sat, 01 October 2016 13:01 Go to previous message
Wim Anckaert is currently offline Wim AnckaertFriend
Messages: 32
Registered: December 2012
Member
Fixed !

Appearantly it used Display from the swt library as my repository was neon.
It didn't take the rwt Display and that was the problem.

Our project still targets both RCP/RAP platform

I've updated my ....plugin.test/pom.xml
and added following dependencies to tycho-surefire-plugin next to my own plugin
<dependency>
<type>eclipse-plugin</type>
<artifactId>org.eclipse.rap.rwt</artifactId>
<!-- This is the minimum required version -->
<version>3.1.0</version>
</dependency>
<dependency>
<type>eclipse-plugin</type>
<artifactId>org.eclipse.rap.ui</artifactId>
<!-- This is the minimum required version -->
<version>3.1.0</version>
</dependency>

then I had no illegal thread access anymore.
Previous Topic:Upload Image File
Next Topic:FileDialog and File Extensions Filtering
Goto Forum:
  


Current Time: Wed Oct 17 07:09:04 GMT 2018

Powered by FUDForum. Page generated in 0.01989 seconds
.:: Contact :: Home ::.

Powered by: FUDforum 3.0.2.
Copyright ©2001-2010 FUDforum Bulletin Board Software

Back to the top