

Classes | |
| class | TestErrorHandler |
| class | TestResource |
| class | TestResourceChecker |
Public Member Functions | |
| void | testMonitorEasy () throws Exception |
| void | testResourceCheckException () throws Exception |
| void | testResourceUnavailable () throws Exception |
| void | testUsageErrorResponse () throws Exception |
Protected Member Functions | |
| void | setUp () throws Exception |
| void | tearDown () throws Exception |
Private Attributes | |
| SubsysResourceMonitor | subsysResourceMonitor |
| Logger | logger |
| CleaningDaemonThreadFactory | threadFactory |
Static Private Attributes | |
| static final int | checkDelaySeconds = 5 |
Test for SubsysResourceMonitor.
| void alma::ACS::MasterComponentImpl::SubsysResourceMonitorTest::setUp | ( | ) | throws Exception [inline, protected] |
| void alma::ACS::MasterComponentImpl::SubsysResourceMonitorTest::tearDown | ( | ) | throws Exception [inline, protected] |
| void alma::ACS::MasterComponentImpl::SubsysResourceMonitorTest::testMonitorEasy | ( | ) | throws Exception [inline] |
Verifies the regular resource status checks under ideal conditions. Also tests the basic functioning of the test handlers and listeners used by this class.
References alma::acs::container::CleaningDaemonThreadFactory::_getAllThreadsCreated(), checkDelaySeconds, alma::ACS::MasterComponentImpl::SubsysResourceMonitorTest::TestResource::getName(), alma::ACS::MasterComponentImpl::SubsysResourceMonitor::getNumberOfMonitorTasks(), alma::ACS::MasterComponentImpl::SubsysResourceMonitorTest::TestResourceChecker::getResource(), alma::ACS::MasterComponentImpl::SubsysResourceMonitorTest::TestResourceChecker::getResourceName(), logger, alma::ACS::MasterComponentImpl::SubsysResourceMonitor::monitorResource(), alma::ACS::MasterComponentImpl::SubsysResourceMonitorTest::TestResource::setState(), alma::ACS::MasterComponentImpl::SubsysResourceMonitorTest::TestResource::setStateCheckCounter(), alma::ACS::MasterComponentImpl::SubsysResourceMonitorTest::TestResource::setTestDelaySeconds(), subsysResourceMonitor, and threadFactory.
| void alma::ACS::MasterComponentImpl::SubsysResourceMonitorTest::testResourceCheckException | ( | ) | throws Exception [inline] |
Tests if resource unreachability is propagated to the client when it is not detected by a timeout in the monitoring framework, but by getting a RuntimeException such as TRANSIENT for a Corba resource.
References logger, alma::ACS::MasterComponentImpl::SubsysResourceMonitor::monitorResource(), alma::ACS::MasterComponentImpl::SubsysResourceMonitorTest::TestResource::setCheckStateRuntimeEx(), alma::ACS::MasterComponentImpl::SubsysResourceMonitorTest::TestErrorHandler::setIsPermanentlyUnreachable(), alma::ACS::MasterComponentImpl::SubsysResourceMonitorTest::TestErrorHandler::setUnreachabilitySync(), and subsysResourceMonitor.
| void alma::ACS::MasterComponentImpl::SubsysResourceMonitorTest::testResourceUnavailable | ( | ) | throws Exception [inline] |
Simulates hanging monitor calls, and tests the notification of the error handler, the creation and reuse of threads, the continuation and eventual termination of monitoring calls.
References alma::acs::container::CleaningDaemonThreadFactory::_getAllThreadsCreated(), checkDelaySeconds, alma::ACS::MasterComponentImpl::SubsysResourceMonitorTest::TestErrorHandler::getBadStateCount(), alma::ACS::MasterComponentImpl::SubsysResourceMonitor::getNumberOfMonitorTasks(), alma::ACS::MasterComponentImpl::SubsysResourceMonitor::getResourceCheckRunner(), alma::ACS::MasterComponentImpl::SubsysResourceMonitorTest::TestErrorHandler::getUnreachableCount(), logger, alma::ACS::MasterComponentImpl::SubsysResourceMonitor::monitorResource(), alma::ACS::MasterComponentImpl::SubsysResourceMonitorTest::TestErrorHandler::setIsPermanentlyUnreachable(), alma::ACS::MasterComponentImpl::SubsysResourceMonitorTest::TestResource::setTestDelaySeconds(), alma::ACS::MasterComponentImpl::SubsysResourceMonitorTest::TestErrorHandler::setUnreachabilitySync(), subsysResourceMonitor, and threadFactory.
| void alma::ACS::MasterComponentImpl::SubsysResourceMonitorTest::testUsageErrorResponse | ( | ) | throws Exception [inline] |
Tests whether bad user-supplied parameters are handled gracefully.
| Exception |
References alma::ACS::MasterComponentImpl::SubsysResourceMonitor::getNumberOfMonitorTasks(), logger, alma::ACS::MasterComponentImpl::SubsysResourceMonitor::monitorResource(), alma::ACS::MasterComponentImpl::SubsysResourceMonitorTest::TestResource::setName(), and subsysResourceMonitor.
final int alma::ACS::MasterComponentImpl::SubsysResourceMonitorTest::checkDelaySeconds = 5 [static, private] |
Referenced by setUp(), testMonitorEasy(), and testResourceUnavailable().
Logger alma::ACS::MasterComponentImpl::SubsysResourceMonitorTest::logger [private] |
Referenced by setUp(), tearDown(), testMonitorEasy(), testResourceCheckException(), testResourceUnavailable(), and testUsageErrorResponse().
SubsysResourceMonitor alma::ACS::MasterComponentImpl::SubsysResourceMonitorTest::subsysResourceMonitor [private] |
Referenced by setUp(), tearDown(), testMonitorEasy(), testResourceCheckException(), testResourceUnavailable(), and testUsageErrorResponse().
CleaningDaemonThreadFactory alma::ACS::MasterComponentImpl::SubsysResourceMonitorTest::threadFactory [private] |
Referenced by setUp(), testMonitorEasy(), and testResourceUnavailable().
1.6.2