Errai testing issue with multimodule project
cristianmiranda Mar 12, 2014 10:19 AMHi guys,
csa, we talked about this in the errai IRC channel.
I’m stucked with the models project (external module) inheritance in our App.gwt.xml module. I’ve created a test like this:
package app.client.ui; import app.client.local.Dashboard; import org.jboss.errai.bus.client.tests.AbstractErraiTest; public class RPCClientTest extends AbstractErraiTest { private Dashboard dashboard; @Override public String getModuleName() { return "app.App"; } @Override protected void gwtSetUp() throws Exception { super.gwtSetUp(); } public void testSendMessage() throws Exception { assertNull(null); } }
Basically, when I add the Dashboard page in it like I’m doing in the fifth line and run the tests like this:
mvn clean test -Ptestui -Denvironment=dev
… it fails and throw me these errors: http://pastebin.com/An8zeYGG
Here is the pom.xml: http://pastebin.com/vpe8XS5f
Here is App.gwt.xml: http://pastebin.com/UL1NaNBa
Here is Models.gwt.xml: http://pastebin.com/S4YAzm6P
Here is Entities.gwt.xml: http://pastebin.com/dDs4LzP7
Here is the models project structure (all the model classes are inside models/shared)
I’ve tried the following in order to fix this:
Changes in App.gwt.xml & Models.gwt.xml
- Making Models.gwt.xml the only module in models project (to avoid transitive inheritance)
- Adding sources explicitly in App.gwt.xml
This is adding the following:
<source path='shared’/>
<source path='validation’/>
… but then it complains about not knowing the test (only failure). Fixing that by adding
<source path=‘client’/>
… and we’re back with the same models errors as before. - Inheriting com.magick.models.Entities in App.gwt.xml (to avoid transitive inheritance)
Changes in pom.xml
- Changed maven surfire plugin to maven gwt plugin to run the tests
- Moved test from the current package to see if there was a problem with cyclic dependencies
- Added -Dorg.jboss.errai.bus.do_long_poll=false as Errai documentation recommends in order to make the tests succeed (It has nothing to do with the models
Any help will be appreciated.
Let me know if you have any questions.
Kindest Regards,