From 208cc427e5e9426da7229e776d253827e191693c Mon Sep 17 00:00:00 2001 From: Giancarlo Panichi Date: Tue, 12 Nov 2013 18:03:11 +0000 Subject: [PATCH] Test Skipped on POM git-svn-id: https://svn.d4science.research-infrastructures.eu/gcube/trunk/portlets/user/tabular-data-information-widget@85386 82a268e6-3cf1-43bd-a215-b396298e98cf --- pom.xml | 5 +- .../client/GwtTestInformation.java | 62 +++++++------------ 2 files changed, 25 insertions(+), 42 deletions(-) diff --git a/pom.xml b/pom.xml index 3f83ab8..73bb723 100644 --- a/pom.xml +++ b/pom.xml @@ -148,8 +148,9 @@ maven-surefire-plugin 2.16 - + true **/GwtTest*.java + @@ -169,7 +170,7 @@ - test + resources diff --git a/src/test/java/org/gcube/portlets/user/td/informationwidget/client/GwtTestInformation.java b/src/test/java/org/gcube/portlets/user/td/informationwidget/client/GwtTestInformation.java index 6a5ab76..3e127db 100644 --- a/src/test/java/org/gcube/portlets/user/td/informationwidget/client/GwtTestInformation.java +++ b/src/test/java/org/gcube/portlets/user/td/informationwidget/client/GwtTestInformation.java @@ -1,11 +1,12 @@ package org.gcube.portlets.user.td.informationwidget.client; -import org.gcube.portlets.user.td.gwtservice.client.rpc.TDGWTService; import org.gcube.portlets.user.td.gwtservice.client.rpc.TDGWTServiceAsync; +import org.gcube.portlets.user.td.gwtservice.shared.TabResource; import com.google.gwt.core.client.GWT; import com.google.gwt.junit.client.GWTTestCase; +import com.google.gwt.user.client.rpc.AsyncCallback; import com.google.gwt.user.client.rpc.ServiceDefTarget; /** @@ -33,50 +34,31 @@ public class GwtTestInformation extends GWTTestCase { */ public void testInformation() { // Create the service that we will test. - TDGWTServiceAsync tdGXTService = GWT.create(TDGWTService.class); - ServiceDefTarget target = (ServiceDefTarget) tdGXTService; - System.out.println(GWT.getModuleBaseURL() + "/TDGWTService"); - target.setServiceEntryPoint(GWT.getModuleBaseURL() + "/TDGWTService"); - - // Since RPC calls are asynchronous, we will need to wait for a response - // after this test method returns. This line tells the test runner to wait - // up to 10 seconds before timing out. - delayTestFinish(2000); - finishTest(); + TDGWTServiceAsync tdGWTService = TDGWTServiceAsync.INSTANCE; + ServiceDefTarget target = (ServiceDefTarget) tdGWTService; + System.out.println(GWT.getModuleBaseURL() + "TDGWTService"); + target.setServiceEntryPoint(GWT.getModuleBaseURL() + "TDGWTService"); // Send a request to the server. - /*try { - TDGXTServiceAsync.INSTANCE.getTabResource( - new AsyncCallback() { - - - @Override - public void onSuccess(TabResource result) { - assertTrue(result!=null); - System.out.println(result); - // Now that we have received a response, we need to tell the test runner - // that the test is complete. You must call finishTest() after an - // asynchronous test finishes successfully, or the test will time out. - finishTest(); - } + /*tdGWTService.getTabResourceInformation(new AsyncCallback(){ - @Override - public void onFailure(Throwable caught) { - // The request resulted in an unexpected error. - fail("Request failure: " + caught.getMessage()); - - + @Override + public void onFailure(Throwable caught) { + fail("Request failure: " + caught.getMessage()); + + } - } - - }); - } catch (TDGXTServiceException e) { - System.out.println("Error in comunications: "+e.getLocalizedMessage()); - e.printStackTrace(); - } - */ - + @Override + public void onSuccess(TabResource result) { + assertTrue(result!=null); + System.out.println(result); + finishTest(); + } + });*/ + delayTestFinish(1000); + finishTest(); + }