Skip to content
This repository has been archived by the owner on Jul 11, 2022. It is now read-only.

Commit

Permalink
[BZ 1088264] AvailabilityExecutor stops calling getAvailability() on
Browse files Browse the repository at this point in the history
ResourceComponent after it previously failed with exception

The issue was in handling exception comming from future. When availability
check failed with exception we cought it, next run, just by calling
future.get() raises the very same exception. We forgot to mark future to be
rescheduled next time = setting it to null. This commit also makes exception
message more verbose so we know more what happened in plugin
  • Loading branch information
Libor Zoubek committed Apr 17, 2014
1 parent 02513a8 commit 937cb29
Showing 1 changed file with 2 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -221,7 +221,8 @@ public AvailabilityType getAvailability() {
return UNKNOWN;

} catch (ExecutionException e) {
throw new RuntimeException("Availability check failed", e.getCause());
availabilityFuture = null; // undefine, so in next run new (no longer failed) instance is scheduled
throw new RuntimeException("Availability check failed : "+e.getCause().getMessage(), e.getCause());

} catch (java.util.concurrent.TimeoutException e) {
// failed to get avail synchronously. next call to the future will return availability (we hope)
Expand Down

0 comments on commit 937cb29

Please sign in to comment.