Skip to content

Commit

Permalink
Renamed trace to throwable in IgnoredException container
Browse files Browse the repository at this point in the history
  • Loading branch information
grofoli committed Dec 8, 2019
1 parent dd4d538 commit 72cbd12
Show file tree
Hide file tree
Showing 4 changed files with 9 additions and 9 deletions.
Expand Up @@ -103,7 +103,7 @@ public <T> void await(final ConditionEvaluationHandler<T> conditionEvaluationHan
break;
}
if (lastResult.hasTrace()) {
conditionEvaluationHandler.handleTrace(lastResult.getTrace());
conditionEvaluationHandler.handleIgnoredException(lastResult.getTrace());
}

pollInterval = conditionSettings.getPollInterval().next(pollCount, pollInterval);
Expand Down
Expand Up @@ -105,12 +105,12 @@ public void handleTimeout(String message, boolean isConditionSatisfied) {
}
}

public void handleTrace(Throwable trace) {
public void handleIgnoredException(Throwable throwable) {
ConditionEvaluationListener<T> listener = settings.getConditionEvaluationListener();
if (listener != null) {
long elapsedTimeInMS = watch.getElapsedTimeInMS();
long remainingTimeInMS = getRemainingTimeInMS(elapsedTimeInMS, settings.getMaxWaitTime());
listener.exceptionIgnored(new IgnoredException(trace, elapsedTimeInMS, remainingTimeInMS, settings.getAlias()));
listener.exceptionIgnored(new IgnoredException(throwable, elapsedTimeInMS, remainingTimeInMS, settings.getAlias()));
}
}

Expand Down
Expand Up @@ -72,7 +72,7 @@ public void onTimeout(TimeoutEvent timeoutEvent) {

@Override
public void exceptionIgnored(IgnoredException ignoredException) {
System.out.printf("Exception %s has been ignored", ignoredException.getTrace().getMessage());
System.out.printf("Exception %s has been ignored", ignoredException.getThrowable().getMessage());
}

/**
Expand Down
@@ -1,20 +1,20 @@
package org.awaitility.core;

public class IgnoredException {
private final Throwable trace;
private final Throwable throwable;
private final long elapsedTimeInMS;
private final long remainingTimeInMS;
private final String alias;

public IgnoredException(Throwable trace, long elapsedTimeInMS, long remainingTimeInMS, String alias) {
this.trace = trace;
public IgnoredException(Throwable throwable, long elapsedTimeInMS, long remainingTimeInMS, String alias) {
this.throwable = throwable;
this.elapsedTimeInMS = elapsedTimeInMS;
this.remainingTimeInMS = remainingTimeInMS;
this.alias = alias;
}

public Throwable getTrace() {
return trace;
public Throwable getThrowable() {
return throwable;
}

public long getElapsedTimeInMS() {
Expand Down

0 comments on commit 72cbd12

Please sign in to comment.