Brian: well said. I'm on that road now. As a commend: I tried block the 
client with some dirty sleep() function like the following , and in 
devmode, as I suspected, It didn't worked, because, the devmode itlself was 
being blocked too !!!!

function sleep(milliseconds) {
  var start = new Date().getTime();
  for (var i = 0; i < 1e7; i++) {
    if ((new Date().getTime() - start) > milliseconds){
      break;
    }
  }}



On Thursday, October 4, 2012 10:47:00 PM UTC-3, Brian Slesinsky wrote:
>
> Yes, running in the JVM is better. I've tried pretty hard to make this 
> work well and as a result, I don't recommend writing integration tests in 
> GWT (or JavaScript). Integration tests are naturally represented as a 
> sequence of actions that perform I/O, and this works better on a platform 
> that supports blocking I/O natively. There are design patterns to make a 
> chain of async callbacks look more sequential, but the resulting code still 
> ends up looking pretty unnatural and hard to debug.
>
> - Brian
>
> On Wednesday, October 3, 2012 2:39:55 PM UTC-7, Sebastián Gurin wrote:
>>
>> Aja Jens I understand now thanks.  Tests are normal java programs that 
>> perform RPC targetting your  running gwt application somewhere else.Trying 
>> to get it work that way. Thanks again. 
>>
>> On Wednesday, October 3, 2012 6:26:43 PM UTC-3, Jens wrote:
>>>
>>>
>>> Jens, thank you but as I suspected I have troubles. What do you mean 
>>>> with "a pure JUnit test" ? you mean a non gwt program ? A pure junit test 
>>>> launched from a "normal java runtime", not in GWT ? 
>>>
>>>
>>> Yes. See the provided tests of gwt-syncproxy (e.g.: 
>>> http://code.google.com/p/gwt-syncproxy/source/browse/trunk/test/com/gdevelop/gwt/syncrpc/test/EnumsTest.java).
>>>  
>>> These are normal JUnit Tests. 
>>>
>>>  
>>>
>>>> I thought syncproxy was a library for the gwt client side, so it is 
>>>> strange to me that dodn't come with a gwt module definition. The docs says 
>>>> (
>>>> http://code.google.com/p/gwt-syncproxy/) I must instantiate the 
>>>> service class on the client side like this: 
>>>>
>>>> private static GreetingService rpcService =
>>>>   SyncProxy.newProxyInstance(GreetingService.class,
>>>>         "http://example.com/helloApp";, "greet");
>>>>
>>>>
>>> When the docs say "Java Client code" it means the client side code of 
>>> the server service. It does not mean GWT client code. 
>>> SyncProxy.newProxyInstance() will never work in GWT client code.
>>>
>>> -- J.
>>>
>>

-- 
You received this message because you are subscribed to the Google Groups 
"Google Web Toolkit" group.
To view this discussion on the web visit 
https://groups.google.com/d/msg/google-web-toolkit/-/IzNA5Fxze7MJ.
To post to this group, send email to google-web-toolkit@googlegroups.com.
To unsubscribe from this group, send email to 
google-web-toolkit+unsubscr...@googlegroups.com.
For more options, visit this group at 
http://groups.google.com/group/google-web-toolkit?hl=en.

Reply via email to