Example usage for com.google.gwt.junit.client.impl JUnitResult getException

List of usage examples for com.google.gwt.junit.client.impl JUnitResult getException

Introduction

In this page you can find the example usage for com.google.gwt.junit.client.impl JUnitResult getException.

Prototype

public Throwable getException() 

Source Link

Usage

From source file:org.jboss.arquillian.gwt.ArquillianJunitMessageQueue.java

License:Apache License

/**
 * Returns true iff any there are no results, missing results, or any of the test results is an exception other than
 * those in {@code THROWABLES_NOT_RETRIED}.
 *///w ww  .  jav  a  2  s  . c  o m
public boolean needsRerunning(TestInfo testInfo) {
    Map<ClientStatus, JUnitResult> results = getResults(testInfo);
    if (results == null) {
        return true;
    }
    if (results.size() != numClients) {
        return true;
    }
    for (Entry<ClientStatus, JUnitResult> entry : results.entrySet()) {
        JUnitResult result = entry.getValue();
        if (result == null) {
            return true;
        }
        Throwable exception = result.getException();
        if (exception != null && !isMember(exception, THROWABLES_NOT_RETRIED)) {
            return true;
        }
    }
    return false;
}