Branch: refs/heads/release/jon3.3.x Home: https://github.com/rhq-project/rhq Commit: 9c86f42aa8ba7dd8694902de94d9383f979be34c https://github.com/rhq-project/rhq/commit/9c86f42aa8ba7dd8694902de94d9383f97... Author: Jay Shaughnessy jshaughn@redhat.com Date: 2014-09-22 (Mon, 22 Sep 2014)
Changed paths: M modules/core/plugin-api/src/main/java/org/rhq/core/pluginapi/availability/AvailabilityFacet.java M modules/core/plugin-container/src/main/java/org/rhq/core/pc/inventory/AvailabilityProxy.java M modules/core/plugin-container/src/test/java/org/rhq/core/pc/inventory/AvailabilityProxyConcurrencyTest.java M modules/core/plugin-container/src/test/java/org/rhq/core/pc/inventory/AvailabilityProxyTest.java
Log Message: ----------- [1145298] - AvailabilityProxy can report a false DOWN Work related to test failure in AvailabilityProxyConcurrencyTest - Two changes to AvailabilityProxy itself - make AvailabilityProxy.getAvailability() a synchronized method. We don't want two threads calling this concurrently. This is not too likely in production, given intervals between checks, but may have been possible when performing a live check. The test code on the other hand was sometimes failing due to parallel execution of the call. - stop AvailabilityProxy.getAvailability() from converting UNKNOWN to DOWN when the avail check is asynchronously in progress. This breaks the contract as stated in the javadoc and could lead to false DOWN reporting. (although, conversely, now fixed it could take longer for valid DOWN to be reported, as a check may need to timeout). - unrelated but update AvailabilityFacet javadoc to add in valid MISSING state - work on the test code. replace the concurrent thread approach with the more realistic serialized calls and change timing around to more predictably mix some calls that complete synchronously and some that complete asynchronously.
(cherry picked from commit 417b4570837b87c939a9a458ab4df3bbe0e48369) Conflicts: modules/core/plugin-container/src/test/java/org/rhq/core/pc/inventory/AvailabilityProxyConcurrencyTest.java