Well regardless, my recommendations should still apply. You should do one of 
the following:

   1. Allow an exception to be thrown on the server-side implementation of 
   the insert indicating that it failed. Fail the test in the onFailure 
   callback of the request. In 99.999% of the cases this should be enough to 
   verify the insertion within the scope of testing. I will echo again, 
   verification that an exception-less insert went through should not be on the 
   responsibility of the database driver's client.
   
   factory.whateverRequest().insert(whatever).fire(new Receiver<...>() {
       @Override onSuccess(...) {
           //This should be enough to pass
       }
       @Override onFailure(...) {
           //This should be enough to fail
           fail();
       }
   }
   
   2. Send the second request within the body of the onSuccess callback of 
   the insertion request.
   
   Something like this:
   factory.whateverRequest().insert(whatever).fire(new Receiver<...>() {
       @Override onSuccess(...) {
           factory.whateverRequest().verify(whatever).fire(new 
   Receiver<Boolean>() {
               @Override onSuccess(Boolean success) {
                   if (!success) { fail(); }
               }
               @Override onFailure(...) { fail(); }
           });
       }
       @Override onFailure(...) { fail(); }
   }

-- 
You received this message because you are subscribed to the Google Groups 
"Google Web Toolkit" group.
To post to this group, send email to [email protected].
To unsubscribe from this group, send email to 
[email protected].
For more options, visit this group at 
http://groups.google.com/group/google-web-toolkit?hl=en.

Reply via email to