

Classes | |
| class | CountingLogConfigSubscriber |
Public Member Functions | |
| LogConfigTest () | |
| void | testSubscriberNotification () throws LogConfigException |
| void | testDefaultValues () throws Exception |
| void | testGetLogConfigXml () throws Exception |
| void | testCDBValues () throws Exception |
| void | testInvalidCDB () throws Exception |
| void | testDynamicChanges () throws Exception |
| void | testLockingRemoteLevel () throws Exception |
Protected Member Functions | |
| void | setUp () throws Exception |
| void | tearDown () throws Exception |
Private Member Functions | |
| String | createComponentsCdbXml (String compName, String type, String code, String container, boolean configureLogger, int minLogLevel, int minLogLevelLocal) |
Private Attributes | |
| LogConfig | logConfig |
| Logger | logger |
Test for LogConfig}. Does not require a running ACS environment.
| alma::acs::logging::config::LogConfigTest::LogConfigTest | ( | ) | [inline] |
| String alma::acs::logging::config::LogConfigTest::createComponentsCdbXml | ( | String | compName, | |
| String | type, | |||
| String | code, | |||
| String | container, | |||
| boolean | configureLogger, | |||
| int | minLogLevel, | |||
| int | minLogLevelLocal | |||
| ) | [inline, private] |
Referenced by testCDBValues(), and testGetLogConfigXml().
| void alma::acs::logging::config::LogConfigTest::setUp | ( | ) | throws Exception [inline, protected] |
References logConfig, logger, and alma::acs::logging::config::LogConfig::setInternalLogger().
| void alma::acs::logging::config::LogConfigTest::tearDown | ( | ) | throws Exception [inline, protected] |
| void alma::acs::logging::config::LogConfigTest::testCDBValues | ( | ) | throws Exception [inline] |
Tests logging config from the CDB, for both cases (a) that env vars beat CDB settings e.g. for normal CDB reading, (b) that CDB beats env vars e.g. during a refresh from CDB triggered via LoggingConfigurable API.
References alma::acs::logging::config::TestCDB::addCurlToXmlMapping(), createComponentsCdbXml(), alma::acs::logging::config::LogConfig::getCentralizedLogger(), alma::acs::logging::config::LogConfig::getDefaultMinLogLevel(), alma::acs::logging::config::LogConfig::getDefaultMinLogLevelLocal(), alma::acs::logging::config::LogConfig::getDispatchPacketSize(), alma::acs::logging::config::LogConfig::getFlushPeriodSeconds(), alma::acs::logging::config::LogConfig::getImmediateDispatchLevel(), alma::acs::logging::config::LogConfig::getLoggerNames(), alma::acs::logging::config::LogConfig::getMaxLogQueueSize(), alma::acs::logging::config::LogConfig::getNamedLoggerConfig(), alma::acs::logging::config::LogConfig::initialize(), logConfig, logger, alma::acs::logging::config::LogConfig::setCDB(), alma::acs::logging::config::LogConfig::setCDBComponentPath(), and alma::acs::logging::config::LogConfig::setCDBLoggingConfigPath().
| void alma::acs::logging::config::LogConfigTest::testDefaultValues | ( | ) | throws Exception [inline] |
Tests the config values returned from LogConfig with at most env vars for default levels being set (can be enforced by TAT!), but without CDB or other information being considered.
Also asserts that none of these calls return the original object, but instead a copy of it. This indirectly exercises the equals method.
References alma::acs::logging::config::LogConfig::getCentralizedLogger(), alma::acs::logging::config::LogConfig::getDefaultMinLogLevel(), alma::acs::logging::config::LogConfig::getDefaultMinLogLevelLocal(), alma::acs::logging::config::LogConfig::getDispatchPacketSize(), alma::acs::logging::config::LogConfig::getFlushPeriodSeconds(), alma::acs::logging::config::LogConfig::getImmediateDispatchLevel(), alma::acs::logging::config::LogConfig::getNamedLoggerConfig(), logConfig, and logger.
| void alma::acs::logging::config::LogConfigTest::testDynamicChanges | ( | ) | throws Exception [inline] |
Tests runtime changes as they could happen via the LoggingConfigurable} API.
References alma::acs::logging::config::LogConfig::getDefaultMinLogLevel(), alma::acs::logging::config::LogConfig::getDefaultMinLogLevelLocal(), alma::acs::logging::config::LogConfig::getLoggerNames(), alma::acs::logging::config::LogConfig::getNamedLoggerConfig(), logConfig, logger, alma::acs::logging::config::LogConfig::setDefaultMinLogLevel(), alma::acs::logging::config::LogConfig::setDefaultMinLogLevelLocal(), and alma::acs::logging::config::LogConfig::setMinLogLevel().
| void alma::acs::logging::config::LogConfigTest::testGetLogConfigXml | ( | ) | throws Exception [inline] |
Test for the XPath based LogConfig#getLogConfigXml(String, String) which extracts log info from the XML that we get from the CDB.
References createComponentsCdbXml(), alma::acs::logging::config::LogConfig::getLogConfigXml(), logConfig, logger, alma::acs::logging::config::LogConfig::setCDB(), alma::acs::logging::config::LogConfig::setCDBComponentPath(), and alma::acs::logging::config::LogConfig::setCDBLoggingConfigPath().
| void alma::acs::logging::config::LogConfigTest::testInvalidCDB | ( | ) | throws Exception [inline] |
Checks the response to bad CDB data and CDB access problems.
References alma::acs::logging::config::TestCDB::addCurlToXmlMapping(), alma::acs::logging::config::LogConfig::initialize(), logConfig, logger, alma::acs::logging::config::LogConfig::setCDB(), alma::acs::logging::config::LogConfig::setCDBLoggingConfigPath(), and alma::acs::logging::config::TestCDB::setThrowException().
| void alma::acs::logging::config::LogConfigTest::testLockingRemoteLevel | ( | ) | throws Exception [inline] |
References alma::acs::logging::config::TestCDB::addCurlToXmlMapping(), alma::acs::logging::config::LogConfig::clearNamedLoggerConfig(), alma::acs::logging::config::LogConfig::getNamedLoggerConfig(), alma::acs::logging::config::LogConfig::initialize(), logConfig, logger, alma::acs::logging::config::LogConfig::setAndLockMinLogLevel(), alma::acs::logging::config::LogConfig::setCDB(), alma::acs::logging::config::LogConfig::setCDBLoggingConfigPath(), and alma::acs::logging::config::LogConfig::setMinLogLevel().
| void alma::acs::logging::config::LogConfigTest::testSubscriberNotification | ( | ) | throws LogConfigException [inline] |
Tests adding and removing of subscribers, and whether LogConfig#initialize(boolean) triggers correctly the notification of these subscribers.
References alma::acs::logging::config::LogConfig::addSubscriber(), alma::acs::logging::config::LogConfig::initialize(), logConfig, logger, and alma::acs::logging::config::LogConfig::removeSubscriber().
Logger alma::acs::logging::config::LogConfigTest::logger [private] |
1.6.2