Вы должны поместить FinestTest в метод onSucess и отложить тест примерно на 500 мс (или, как вы думаете, это займет)
вот пример того, как это должно работать.
private void refreshWatchList() {
StockPriceService stockPriceSvc = GWT.create(StockPriceService.class);
AsyncCallback<StockPrice[]> callback = new AsyncCallback<StockPrice[]>() {
public void onFailure(Throwable caught) {
assert(false) : "The test failed because the RPC service returned an error
}
public void onSuccess(StockPrice[] result) {
//the test was a sucess so we tell the Unittest case to finish (with success)
finishTest();
}
};
// Make the call to the stock price service.
stockPriceSvc.getPrices(stocks.toArray(new String[0]), callback);
//delay the finish of the test by 500ms
//if finishTest() isn't call before 500ms passed, the test will fail
delayTestFinish(500);
}
PS: вам не нужен таймер для проверки вызовов RPC