HC4Provider and replacement for HttpClientUtil. * initial imple * Fixed existing tests: HttpClientUtilTest renamed to HttpClientManager and it tests (as before) that "redirect strategy" being applied is correct. HttpClientRemoteStorageTest test fixed. * classes renamed to "guice style" (from DefaultX to XImpl) * added tests (UT + IT) * Removal of HC3x class uses from HC4x RRS. Introduction of new exceptions to mark RRS transport problems. * RemoteStorageTransportOverloadedException for "overloaded" case, when a RRS in unable to make an outbound request because it's simply too busy. * handled the ConnectionPoolTimeoutException in HC4x RRS, case we never had before * RemoteStorageTransportOverloadedException does not cause repository to autoblock * NFC is managed only in cases of ItemNotFoundEx, so this exception will "bubble up" to REST API, where it will need proper handling, like returning 503 Service Unavailable or such * Handling RemoteStorageTransportOverloadedException exception in REST API. It will return 503 Service Unavailable when RemoteStorageTransportOverloadedException thrown.
…ling assertions Signed-off-by: Alin Dreghiciu <firstname.lastname@example.org>
* bumped version to httpclient 4.2.1 + httpcore 4.2.2 + httpmime 4.2.1 (latest GA) * applied recommended changes to connManager, parameters handling * catching IllegalStateException thrown by httpClient connmgr in case when JVM lacks support for TLS (was swallowed without this) * removing explicit connection close, to make use of pooling
…que (no same member repository multiple times) Signed-off-by: Alin Dreghiciu <email@example.com>
…r so that remote browsing secure.central gets the proper request paramemters.
ITs started failing because they could not read the encrypted problem report bundles' content.
We have in codebase test classes named 'Abstract*' but are not really 'abstract' and ones that are really abstract ( meant to be extended only ) surefire will do the right thing by allowing it to try to run any class that ends in Test and starts with Abstract. This will allow us to have test for real classes that are named Abstract* and keep the naming convention that IDEs expect for tests. 'abstract' test classes are still not run. If developer intends otherwise to execute a test class named 'Abstract*' then add one or more test methods and do not make it abstract. I noticed several tests that were being missed besides the ones covered in nexus-5197 because once upon a time we excluded Abstract named classes. ( probably my suggestion ). I've left failsafe config to ignore Abstract* named test classes because I am unclear on TestNG semantics and also those should be integration tests, which do not normally follow the convention of unit tests where tests are named one to one to the unit under test + 'Test' suffix
The appender did change between 2.1 and 2.2. Problem with "upgrade step" is that log manager is started from a servlet context listener, way before nexus is, hence, nexus upgrade step would be able to do anything way after logback configuration is loaded (and errors would be emitted about Appender). After chatting with Alin, this looked the simplest: introduce a marker interface, that would be implemented by those implementations of LogConfigurationParticipant, that does NOT want to let users tamper with their configuration. Event system config participant is such LogConfigurationParticipant (see it's config file, states "DO NOT EDIT"). When LogbackLogManager detects that a participant implements this marker interface, it will not check for config file existence (as it happened before this change) and write it out when not present, but it will "blindly", always write it out, potentially replacing the changed file. Now, the LogbackNexusEventSystemLogConfigurationParticipant implements the NonEditable marker interface and this resolves the problem, as on upgrade (from X to 2.2), 2.2 will simply overwrite the logback-event.xml.
nexus.properties is only contained in the nexus bundles, while the webapp's plexus.properties are already set when running the Nexus WAR.