diff options
author | Keith Wall <kwall@apache.org> | 2014-03-18 11:31:52 +0000 |
---|---|---|
committer | Keith Wall <kwall@apache.org> | 2014-03-18 11:31:52 +0000 |
commit | e5e3a215f30176a60661ad263331df1f5f3f896d (patch) | |
tree | 5f7b7f1eea736222e8cc7a76d8c7fc4ba5b48932 | |
parent | 451d05e9b7e7cc8070482983e511d703b4a2961f (diff) | |
parent | eba5294974fb2a73b4e765c74196ba4a63079f03 (diff) | |
download | qpid-python-e5e3a215f30176a60661ad263331df1f5f3f896d.tar.gz |
NO-JIRA: Merged changes from trunk with command:
svn merge https://svn.apache.org/repos/asf/qpid/trunk
git-svn-id: https://svn.apache.org/repos/asf/qpid/branches/java-broker-bdb-ha2@1578827 13f79535-47bb-0310-9956-ffa450edef68
53 files changed, 644 insertions, 206 deletions
diff --git a/qpid/cpp/src/CMakeLists.txt b/qpid/cpp/src/CMakeLists.txt index d8b823fc8e..73b3e675c7 100644 --- a/qpid/cpp/src/CMakeLists.txt +++ b/qpid/cpp/src/CMakeLists.txt @@ -1084,7 +1084,7 @@ set (qpidmessaging_SOURCES add_msvc_version (qpidmessaging library dll) add_library (qpidmessaging SHARED ${qpidmessaging_SOURCES}) -target_link_libraries (qpidmessaging qpidtypes qpidclient qpidcommon "${Boost_PROGRAM_OPTIONS_LIBRARY}" ${PROTON_LIBRARIES}) +target_link_libraries (qpidmessaging qpidtypes qpidclient qpidcommon "${Boost_PROGRAM_OPTIONS_LIBRARY}" ${Proton_LIBRARIES}) set_target_properties (qpidmessaging PROPERTIES LINK_FLAGS "${HIDE_SYMBOL_FLAGS} ${LINK_VERSION_SCRIPT_FLAG}" COMPILE_FLAGS "${HIDE_SYMBOL_FLAGS}" @@ -1373,7 +1373,7 @@ set (prefix ${CMAKE_INSTALL_PREFIX}) set (exec_prefix ${CMAKE_INSTALL_PREFIX}) set_absolute_install_path (libdir ${QPID_INSTALL_LIBDIR}) set_absolute_install_path (includedir ${QPID_INSTALL_INCLUDEDIR}) -set (VERSION ${QPID_VERSION}) +set (VERSION ${QPID_VERSION_FULL}) #add_custom_target(pkgconfig ALL echo DEPENDS ${CMAKE_CURRENT_BINARY_DIR}/qpid.pc) #add_dependencies(pkgconfig ${CMAKE_CURRENT_BINARY_DIR}/qmf2.pc) @@ -1382,3 +1382,23 @@ configure_file(qmf2.pc.in ${CMAKE_CURRENT_BINARY_DIR}/qmf2.pc @ONLY) install (FILES ${CMAKE_CURRENT_BINARY_DIR}/qpid.pc ${CMAKE_CURRENT_BINARY_DIR}/qmf2.pc DESTINATION ${QPID_INSTALL_LIBDIR}/pkgconfig COMPONENT ${QPID_COMPONENT_COMMON}) + +if (DEFINED CMAKE_IMPORT_LIBRARY_PREFIX) +set(QPIDMSGLIB ${CMAKE_IMPORT_LIBRARY_PREFIX}qpidmessaging${CMAKE_IMPORT_LIBRARY_SUFFIX}) +set(QPIDMSGLIBDEBUG ${CMAKE_IMPORT_LIBRARY_PREFIX}qpidmessaging${CMAKE_DEBUG_POSTFIX}${CMAKE_IMPORT_LIBRARY_SUFFIX}) +set(QPIDTYPESLIB ${CMAKE_IMPORT_LIBRARY_PREFIX}qpidtypes${CMAKE_IMPORT_LIBRARY_SUFFIX}) +set(QPIDTYPESLIBDEBUG ${CMAKE_IMPORT_LIBRARY_PREFIX}qpidtypes${CMAKE_DEBUG_POSTFIX}${CMAKE_IMPORT_LIBRARY_SUFFIX}) +else () +set(QPIDMSGLIB ${CMAKE_SHARED_LIBRARY_PREFIX}qpidmessaging${CMAKE_SHARED_LIBRARY_SUFFIX}) +set(QPIDMSGLIBDEBUG ${CMAKE_SHARED_LIBRARY_PREFIX}qpidmessaging${CMAKE_DEBUG_POSTFIX}${CMAKE_SHARED_LIBRARY_SUFFIX}) +set(QPIDTYPESLIB ${CMAKE_SHARED_LIBRARY_PREFIX}qpidtypes${CMAKE_SHARED_LIBRARY_SUFFIX}) +set(QPIDTYPESLIBDEBUG ${CMAKE_SHARED_LIBRARY_PREFIX}qpidtypes${CMAKE_DEBUG_POSTFIX}${CMAKE_SHARED_LIBRARY_SUFFIX}) +endif () + +configure_file(QpidConfig.cmake.in ${CMAKE_CURRENT_BINARY_DIR}/QpidConfig.cmake @ONLY) +configure_file(QpidConfigVersion.cmake.in ${CMAKE_CURRENT_BINARY_DIR}/QpidConfigVersion.cmake @ONLY) +install (FILES + ${CMAKE_CURRENT_BINARY_DIR}/QpidConfig.cmake + ${CMAKE_CURRENT_BINARY_DIR}/QpidConfigVersion.cmake + DESTINATION ${QPID_INSTALL_LIBDIR}/cmake/Qpid + COMPONENT ${QPID_COMPONENT_COMMON}) diff --git a/qpid/cpp/src/QpidConfig.cmake.in b/qpid/cpp/src/QpidConfig.cmake.in new file mode 100644 index 0000000000..3f84e3b6b0 --- /dev/null +++ b/qpid/cpp/src/QpidConfig.cmake.in @@ -0,0 +1,30 @@ +# +# Licensed to the Apache Software Foundation (ASF) under one +# or more contributor license agreements. See the NOTICE file +# distributed with this work for additional information +# regarding copyright ownership. The ASF licenses this file +# to you under the Apache License, Version 2.0 (the +# "License"); you may not use this file except in compliance +# with the License. You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, +# software distributed under the License is distributed on an +# "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY +# KIND, either express or implied. See the License for the +# specific language governing permissions and limitations +# under the License. +# + +# Name: Qpid +# Description: Qpid Client C library +# Version: @VERSION@ +# URL: http://qpid.apache.org/ + +set (Qpid_VERSION @VERSION@) + +set (Qpid_INCLUDE_DIRS @includedir@) +set (Qpid_LIBRARIES optimized @libdir@/@QPIDMSGLIB@ @libdir@/@QPIDTYPESLIB@ debug @libdir@/@QPIDMSGLIBDEBUG@ @libdir@/@QPIDTYPESLIBDEBUG@) + +set (Qpid_FOUND True) diff --git a/qpid/cpp/src/QpidConfigVersion.cmake.in b/qpid/cpp/src/QpidConfigVersion.cmake.in new file mode 100644 index 0000000000..d85924ab7e --- /dev/null +++ b/qpid/cpp/src/QpidConfigVersion.cmake.in @@ -0,0 +1,30 @@ +# This is a basic version file for the Config-mode of find_package(). +# It is used by write_basic_package_version_file() as input file for configure_file() +# to create a version-file which can be installed along a config.cmake file. +# +# The created file sets PACKAGE_VERSION_EXACT if the current version string and +# the requested version string are exactly the same and it sets +# PACKAGE_VERSION_COMPATIBLE if the current version is >= requested version. + +set(PACKAGE_VERSION "@VERSION@") + +if("${PACKAGE_VERSION}" VERSION_LESS "${PACKAGE_FIND_VERSION}" ) + set(PACKAGE_VERSION_COMPATIBLE FALSE) +else() + set(PACKAGE_VERSION_COMPATIBLE TRUE) + if( "${PACKAGE_FIND_VERSION}" STREQUAL "${PACKAGE_VERSION}") + set(PACKAGE_VERSION_EXACT TRUE) + endif() +endif() + +# if the installed or the using project don't have CMAKE_SIZEOF_VOID_P set, ignore it: +if("${CMAKE_SIZEOF_VOID_P}" STREQUAL "" OR "@CMAKE_SIZEOF_VOID_P@" STREQUAL "") + return() +endif() + +# check that the installed version has the same 32/64bit-ness as the one which is currently searching: +if(NOT "${CMAKE_SIZEOF_VOID_P}" STREQUAL "@CMAKE_SIZEOF_VOID_P@") + math(EXPR installedBits "@CMAKE_SIZEOF_VOID_P@ * 8") + set(PACKAGE_VERSION "${PACKAGE_VERSION} (${installedBits}bit)") + set(PACKAGE_VERSION_UNSUITABLE TRUE) +endif() diff --git a/qpid/cpp/src/amqp.cmake b/qpid/cpp/src/amqp.cmake index 39f45954f3..d1ff184a64 100644 --- a/qpid/cpp/src/amqp.cmake +++ b/qpid/cpp/src/amqp.cmake @@ -19,61 +19,30 @@ # Optional AMQP1.0 support. Requires proton toolkit. -include(FindPkgConfig) - -pkg_check_modules(PROTON libqpid-proton) - -if (NOT PROTON_FOUND) - # if pkg-config is absent or fails to find proton then use - # PROTON_ROOT command line option or environment variable to locate - # local installed proton build. - if (NOT PROTON_ROOT) - set (PROTON_ROOT "$ENV{PROTON_ROOT}") - endif() - if (PROTON_ROOT) - find_package(proton PATHS ${PROTON_ROOT} NO_DEFAULT_PATH) - - if (proton_FOUND EQUAL 1) - set(iFile "${PROTON_ROOT}/lib/proton.cmake/libqpid-proton.cmake") - if(EXISTS ${iFile}) - include("${iFile}") - else() - message(FATAL_ERROR "PROTON_ROOT defined but file ${iFile} is missing") - endif() - else() - message(FATAL_ERROR "Proton package files not found in ${PROTON_ROOT}") - endif() - endif() -endif() +find_package(Proton 0.5) set (amqp_default ${amqp_force}) -set (minimum_version 0.5) set (maximum_version 0.6) -if (PROTON_FOUND) - if (PROTON_VERSION LESS ${minimum_version}) - message(STATUS "Qpid proton ${PROTON_VERSION} is too old, require ${minimum_version} - ${maximum_version}; amqp 1.0 support not enabled") - else (PROTON_VERSION LESS ${minimum_version}) - if (PROTON_VERSION GREATER ${maximum_version}) - message(STATUS "Qpid proton ${PROTON_VERSION} is too new, require ${minimum_version} - ${maximum_version}; amqp 1.0 support not enabled") - else (PROTON_VERSION GREATER ${maximum_version}) - message(STATUS "Qpid proton found, amqp 1.0 support enabled") - set (amqp_default ON) - #remove when 0.5 no longer supported - if (NOT PROTON_VERSION EQUAL 0.5) - set (HAVE_PROTON_TRACER 1) - endif (NOT PROTON_VERSION EQUAL 0.5) - endif (PROTON_VERSION GREATER ${maximum_version}) - endif (PROTON_VERSION LESS ${minimum_version}) -else (PROTON_FOUND) +if (Proton_FOUND) + if (Proton_VERSION GREATER ${maximum_version}) + message(WARNING "Qpid proton ${Proton_VERSION} is not a tested version and might not be compatible, ${maximum_version} is highest tested; build may not work") + endif (Proton_VERSION GREATER ${maximum_version}) + message(STATUS "Qpid proton found, amqp 1.0 support enabled") + set (amqp_default ON) + #remove when 0.5 no longer supported + if (NOT Proton_VERSION EQUAL 0.5) + set (HAVE_PROTON_TRACER 1) + endif (NOT Proton_VERSION EQUAL 0.5) +else () message(STATUS "Qpid proton not found, amqp 1.0 support not enabled") -endif (PROTON_FOUND) +endif () option(BUILD_AMQP "Build with support for AMQP 1.0" ${amqp_default}) if (BUILD_AMQP) - if (NOT PROTON_FOUND) + if (NOT Proton_FOUND) message(FATAL_ERROR "Qpid proton not found, required for amqp 1.0 support") - endif (NOT PROTON_FOUND) + endif () set (amqp_SOURCES qpid/broker/amqp/Authorise.h @@ -129,11 +98,10 @@ if (BUILD_AMQP) qpid/broker/amqp/Translation.cpp ) - include_directories(${PROTON_INCLUDE_DIRS}) - link_directories(${PROTON_LIBRARY_DIRS}) + include_directories(${Proton_INCLUDE_DIRS}) add_library (amqp MODULE ${amqp_SOURCES}) - target_link_libraries (amqp qpidtypes qpidbroker qpidcommon ${PROTON_LIBRARIES} ${Boost_PROGRAM_OPTIONS_LIBRARY}) + target_link_libraries (amqp qpidtypes qpidbroker qpidcommon ${Proton_LIBRARIES} ${Boost_PROGRAM_OPTIONS_LIBRARY}) set_target_properties (amqp PROPERTIES PREFIX "" LINK_FLAGS "${CATCH_UNDEFINED}" @@ -173,18 +141,6 @@ if (BUILD_AMQP) if (WIN32) list (APPEND amqp_SOURCES qpid/messaging/amqp/windows/SslTransport.cpp) list (APPEND amqpc_SOURCES qpid/messaging/amqp/windows/SslTransport.cpp) - - set(proton_dll "${PROTON_LIBRARY_DIRS}/${PROTON_LIBRARIES}.dll") - set(proton_dlld "${PROTON_LIBRARY_DIRS}/${PROTON_LIBRARIES}d.dll") - - install (PROGRAMS ${proton_dll} - DESTINATION ${QPID_INSTALL_BINDIR} - COMPONENT ${QPID_COMPONENT_COMMON} - CONFIGURATIONS Release|MinSizeRel|RelWithDebInfo) - install (PROGRAMS ${proton_dlld} - DESTINATION ${QPID_INSTALL_BINDIR} - COMPONENT ${QPID_COMPONENT_COMMON} - CONFIGURATIONS Debug) endif (WIN32) else (BUILD_AMQP) # ensure that qpid build ignores proton diff --git a/qpid/cpp/src/qpid/messaging/amqp/ConnectionHandle.cpp b/qpid/cpp/src/qpid/messaging/amqp/ConnectionHandle.cpp index c1ab108a61..90227fa29b 100644 --- a/qpid/cpp/src/qpid/messaging/amqp/ConnectionHandle.cpp +++ b/qpid/cpp/src/qpid/messaging/amqp/ConnectionHandle.cpp @@ -31,7 +31,13 @@ namespace amqp { namespace { ConnectionImpl* create(const std::string& u, const qpid::types::Variant::Map& o) { - return new ConnectionHandle(u, o); + try { + return new ConnectionHandle(u, o); + } catch (const types::Exception& ) { + throw; + } catch (const qpid::Exception& e) { + throw messaging::ConnectionError( e.what() ); + } } struct StaticInit diff --git a/qpid/cpp/src/qpid/sys/windows/FileSysDir.cpp b/qpid/cpp/src/qpid/sys/windows/FileSysDir.cpp index e090747715..5128f0f8d6 100644 --- a/qpid/cpp/src/qpid/sys/windows/FileSysDir.cpp +++ b/qpid/cpp/src/qpid/sys/windows/FileSysDir.cpp @@ -79,7 +79,9 @@ void FileSysDir::forEachFile(Callback cb) const { // process everything that isn't a directory do { if (!(findFileData.dwFileAttributes & FILE_ATTRIBUTE_DIRECTORY)) { - std::string fileName(findFileData.cFileName); + std::string fileName(dirPath); + fileName += "\\"; + fileName += findFileData.cFileName; cb(fileName); } } while (FindNextFile(hFind, &findFileData) != 0); diff --git a/qpid/java/bdbstore/src/main/java/org/apache/qpid/server/store/berkeleydb/BDBMessageStore.java b/qpid/java/bdbstore/src/main/java/org/apache/qpid/server/store/berkeleydb/BDBMessageStore.java index c8550b2114..8be037eb7b 100644 --- a/qpid/java/bdbstore/src/main/java/org/apache/qpid/server/store/berkeleydb/BDBMessageStore.java +++ b/qpid/java/bdbstore/src/main/java/org/apache/qpid/server/store/berkeleydb/BDBMessageStore.java @@ -760,12 +760,6 @@ public class BDBMessageStore implements MessageStore, DurableConfigurationStore } @Override - public void update(ConfiguredObjectRecord... records) throws StoreException - { - update(false, records); - } - - @Override public void update(boolean createIfNecessary, ConfiguredObjectRecord... records) throws StoreException { com.sleepycat.je.Transaction txn = _environmentFacade.getEnvironment().beginTransaction(null, null); diff --git a/qpid/java/bdbstore/src/main/java/org/apache/qpid/server/store/berkeleydb/tuple/ConfiguredObjectBinding.java b/qpid/java/bdbstore/src/main/java/org/apache/qpid/server/store/berkeleydb/tuple/ConfiguredObjectBinding.java index a408732e2f..bc3beeb78b 100644 --- a/qpid/java/bdbstore/src/main/java/org/apache/qpid/server/store/berkeleydb/tuple/ConfiguredObjectBinding.java +++ b/qpid/java/bdbstore/src/main/java/org/apache/qpid/server/store/berkeleydb/tuple/ConfiguredObjectBinding.java @@ -24,6 +24,8 @@ import java.io.IOException; import java.io.StringWriter; import java.util.Map; import java.util.UUID; + +import org.apache.qpid.server.model.ConfiguredObject; import org.apache.qpid.server.store.ConfiguredObjectRecord; import com.sleepycat.bind.tuple.TupleBinding; @@ -31,14 +33,42 @@ import com.sleepycat.bind.tuple.TupleInput; import com.sleepycat.bind.tuple.TupleOutput; import org.apache.qpid.server.store.StoreException; import org.codehaus.jackson.JsonGenerationException; +import org.codehaus.jackson.JsonGenerator; +import org.codehaus.jackson.JsonProcessingException; +import org.codehaus.jackson.Version; import org.codehaus.jackson.map.JsonMappingException; +import org.codehaus.jackson.map.JsonSerializer; +import org.codehaus.jackson.map.Module; import org.codehaus.jackson.map.ObjectMapper; +import org.codehaus.jackson.map.SerializerProvider; +import org.codehaus.jackson.map.module.SimpleModule; public class ConfiguredObjectBinding extends TupleBinding<ConfiguredObjectRecord> { private static final ConfiguredObjectBinding INSTANCE = new ConfiguredObjectBinding(null); + private final UUID _uuid; + private static final Module _module; + static + { + SimpleModule module= new SimpleModule("ConfiguredObjectSerializer", new Version(1,0,0,null)); + + final JsonSerializer<ConfiguredObject> serializer = new JsonSerializer<ConfiguredObject>() + { + @Override + public void serialize(final ConfiguredObject value, + final JsonGenerator jgen, + final SerializerProvider provider) + throws IOException, JsonProcessingException + { + jgen.writeString(value.getId().toString()); + } + }; + module.addSerializer(ConfiguredObject.class, serializer); + + _module = module; + } public static ConfiguredObjectBinding getInstance() { @@ -74,7 +104,9 @@ public class ConfiguredObjectBinding extends TupleBinding<ConfiguredObjectRecord try { StringWriter writer = new StringWriter(); - new ObjectMapper().writeValue(writer, object.getAttributes()); + final ObjectMapper objectMapper = new ObjectMapper(); + objectMapper.registerModule(_module); + objectMapper.writeValue(writer, object.getAttributes()); tupleOutput.writeString(object.getType()); tupleOutput.writeString(writer.toString()); } diff --git a/qpid/java/bdbstore/systests/pom.xml b/qpid/java/bdbstore/systests/pom.xml index 7d4913ebcd..e8620d3426 100644 --- a/qpid/java/bdbstore/systests/pom.xml +++ b/qpid/java/bdbstore/systests/pom.xml @@ -67,8 +67,4 @@ </dependency> </dependencies> - <build> - <testSourceDirectory>src/main/java</testSourceDirectory> - </build> - </project> diff --git a/qpid/java/broker-core/src/main/java/org/apache/qpid/server/exchange/AbstractExchange.java b/qpid/java/broker-core/src/main/java/org/apache/qpid/server/exchange/AbstractExchange.java index e34646d66f..a30806d810 100644 --- a/qpid/java/broker-core/src/main/java/org/apache/qpid/server/exchange/AbstractExchange.java +++ b/qpid/java/broker-core/src/main/java/org/apache/qpid/server/exchange/AbstractExchange.java @@ -55,6 +55,7 @@ import org.apache.qpid.server.virtualhost.VirtualHost; import java.util.Collection; import java.util.Collections; +import java.util.HashMap; import java.util.List; import java.util.Map; import java.util.UUID; @@ -582,7 +583,13 @@ public abstract class AbstractExchange<T extends AbstractExchange<T>> final AMQQueue queue, final Map<String, Object> arguments) { - return makeBinding(getBinding(bindingKey,queue).getId(), bindingKey, queue, arguments, false, true); + final BindingImpl existingBinding = getBinding(bindingKey, queue); + return makeBinding(existingBinding == null ? null : existingBinding.getId(), + bindingKey, + queue, + arguments, + false, + true); } @Override @@ -642,8 +649,6 @@ public abstract class AbstractExchange<T extends AbstractExchange<T>> boolean restore, boolean force) { - assert queue != null; - if (bindingKey == null) { bindingKey = ""; @@ -660,7 +665,16 @@ public abstract class AbstractExchange<T extends AbstractExchange<T>> bindingKey, _virtualHost.getName()); } - BindingImpl b = new BindingImpl(id, bindingKey, queue, this, arguments); + + Map<String,Object> attributes = new HashMap<String, Object>(); + attributes.put(org.apache.qpid.server.model.Binding.NAME,bindingKey); + if(arguments != null) + { + attributes.put(org.apache.qpid.server.model.Binding.ARGUMENTS, arguments); + } + + BindingImpl b = new BindingImpl(id, attributes, queue, this); + BindingImpl existingMapping = _bindingsMap.putIfAbsent(new BindingIdentifier(bindingKey,queue), b); if (existingMapping == null || force) { diff --git a/qpid/java/broker-core/src/main/java/org/apache/qpid/server/model/adapter/AbstractConfiguredObject.java b/qpid/java/broker-core/src/main/java/org/apache/qpid/server/model/adapter/AbstractConfiguredObject.java index a498e3e59e..d263bb45b2 100644 --- a/qpid/java/broker-core/src/main/java/org/apache/qpid/server/model/adapter/AbstractConfiguredObject.java +++ b/qpid/java/broker-core/src/main/java/org/apache/qpid/server/model/adapter/AbstractConfiguredObject.java @@ -84,8 +84,18 @@ public abstract class AbstractConfiguredObject<X extends ConfiguredObject<X>> im private final Map<String, Object> _defaultAttributes = new HashMap<String, Object>(); private final TaskExecutor _taskExecutor; - private final long _createdTime; - private final String _createdBy; + + @ManagedAttributeField + private long _createdTime; + + @ManagedAttributeField + private String _createdBy; + + @ManagedAttributeField + private long _lastUpdatedTime; + + @ManagedAttributeField + private String _lastUpdatedBy; @ManagedAttributeField private String _name; @@ -197,8 +207,18 @@ public abstract class AbstractConfiguredObject<X extends ConfiguredObject<X>> im } } } - _createdTime = MapValueConverter.getLongAttribute(CREATED_TIME, attributes, System.currentTimeMillis()); - _createdBy = MapValueConverter.getStringAttribute(CREATED_BY, attributes, getCurrentUserName()); + if(!_attributes.containsKey(CREATED_BY)) + { + final AuthenticatedPrincipal currentUser = SecurityManager.getCurrentUser(); + if(currentUser != null) + { + _attributes.put(CREATED_BY, currentUser); + } + } + if(!_attributes.containsKey(CREATED_TIME)) + { + _attributes.put(CREATED_TIME, System.currentTimeMillis()); + } for(Attribute<?,?> attr : _attributeTypes.values()) { if(attr.getAnnotation().mandatory() && !(attributes.containsKey(attr.getName())|| defaults.containsKey(attr.getName()))) @@ -334,6 +354,17 @@ public abstract class AbstractConfiguredObject<X extends ConfiguredObject<X>> im protected void attributeSet(String attributeName, Object oldAttributeValue, Object newAttributeValue) { + + final AuthenticatedPrincipal currentUser = SecurityManager.getCurrentUser(); + if(currentUser != null) + { + _attributes.put(LAST_UPDATED_BY, currentUser.getName()); + _lastUpdatedBy = currentUser.getName(); + } + final long currentTime = System.currentTimeMillis(); + _attributes.put(LAST_UPDATED_TIME, currentTime); + _lastUpdatedTime = currentTime; + synchronized (_changeListeners) { List<ConfigurationChangeListener> copy = new ArrayList<ConfigurationChangeListener>(_changeListeners); @@ -678,13 +709,13 @@ public abstract class AbstractConfiguredObject<X extends ConfiguredObject<X>> im @Override public String getLastUpdatedBy() { - return null; + return _lastUpdatedBy; } @Override public long getLastUpdatedTime() { - return 0; + return _lastUpdatedTime; } @Override diff --git a/qpid/java/broker-core/src/main/java/org/apache/qpid/server/model/adapter/KeyStoreAdapter.java b/qpid/java/broker-core/src/main/java/org/apache/qpid/server/model/adapter/KeyStoreAdapter.java index 06ca0d2a24..12de8142da 100644 --- a/qpid/java/broker-core/src/main/java/org/apache/qpid/server/model/adapter/KeyStoreAdapter.java +++ b/qpid/java/broker-core/src/main/java/org/apache/qpid/server/model/adapter/KeyStoreAdapter.java @@ -91,11 +91,6 @@ public class KeyStoreAdapter extends AbstractKeyStoreAdapter<KeyStoreAdapter> im _certificateAlias, _keyManagerFactoryAlgorithm); } - @Override - public String getDescription() - { - return null; - } @Override public Collection<String> getAttributeNames() diff --git a/qpid/java/broker-core/src/main/java/org/apache/qpid/server/queue/AbstractQueue.java b/qpid/java/broker-core/src/main/java/org/apache/qpid/server/queue/AbstractQueue.java index ab3da6224e..e5f587ea94 100644 --- a/qpid/java/broker-core/src/main/java/org/apache/qpid/server/queue/AbstractQueue.java +++ b/qpid/java/broker-core/src/main/java/org/apache/qpid/server/queue/AbstractQueue.java @@ -2871,7 +2871,8 @@ public abstract class AbstractQueue if(childClass == Binding.class && otherParents.length == 1 && otherParents[0] instanceof Exchange) { final String bindingKey = (String) attributes.get("name"); - ((ExchangeImpl)otherParents[0]).addBinding(bindingKey, this, attributes); + ((ExchangeImpl)otherParents[0]).addBinding(bindingKey, this, + (Map<String,Object>) attributes.get(Binding.ARGUMENTS)); for(Binding binding : _bindings) { if(binding.getExchange() == otherParents[0] && binding.getName().equals(bindingKey)) diff --git a/qpid/java/broker-core/src/main/java/org/apache/qpid/server/security/SecurityManager.java b/qpid/java/broker-core/src/main/java/org/apache/qpid/server/security/SecurityManager.java index dca3576827..77886e9030 100755 --- a/qpid/java/broker-core/src/main/java/org/apache/qpid/server/security/SecurityManager.java +++ b/qpid/java/broker-core/src/main/java/org/apache/qpid/server/security/SecurityManager.java @@ -34,6 +34,7 @@ import org.apache.qpid.server.security.access.ObjectProperties; import org.apache.qpid.server.security.access.ObjectType; import org.apache.qpid.server.security.access.Operation; import org.apache.qpid.server.security.access.OperationLoggingDetails; +import org.apache.qpid.server.security.auth.AuthenticatedPrincipal; import org.apache.qpid.server.security.auth.TaskPrincipal; import javax.security.auth.Subject; @@ -64,6 +65,7 @@ import java.util.Collections; import java.util.HashMap; import java.util.Map; import java.util.Map.Entry; +import java.util.Set; import java.util.concurrent.ConcurrentHashMap; public class SecurityManager implements ConfigurationChangeListener @@ -183,6 +185,29 @@ public class SecurityManager implements ConfigurationChangeListener return !(subject == null || subject.getPrincipals(SystemPrincipal.class).isEmpty()); } + public static AuthenticatedPrincipal getCurrentUser() + { + Subject subject = Subject.getSubject(AccessController.getContext()); + final AuthenticatedPrincipal user; + if(subject != null) + { + Set<AuthenticatedPrincipal> principals = subject.getPrincipals(AuthenticatedPrincipal.class); + if(principals != null && !principals.isEmpty()) + { + user = principals.iterator().next(); + } + else + { + user = null; + } + } + else + { + user = null; + } + return user; + } + private static final class SystemPrincipal implements Principal { private SystemPrincipal() diff --git a/qpid/java/broker-core/src/main/java/org/apache/qpid/server/store/AbstractJDBCMessageStore.java b/qpid/java/broker-core/src/main/java/org/apache/qpid/server/store/AbstractJDBCMessageStore.java index 740d57f603..81c74fe8f5 100644 --- a/qpid/java/broker-core/src/main/java/org/apache/qpid/server/store/AbstractJDBCMessageStore.java +++ b/qpid/java/broker-core/src/main/java/org/apache/qpid/server/store/AbstractJDBCMessageStore.java @@ -44,13 +44,21 @@ import java.util.concurrent.atomic.AtomicBoolean; import java.util.concurrent.atomic.AtomicLong; import org.apache.log4j.Logger; import org.apache.qpid.server.message.EnqueueableMessage; +import org.apache.qpid.server.model.ConfiguredObject; import org.apache.qpid.server.model.VirtualHost; import org.apache.qpid.server.plugin.MessageMetaDataType; import org.apache.qpid.server.queue.AMQQueue; import org.codehaus.jackson.JsonGenerationException; +import org.codehaus.jackson.JsonGenerator; import org.codehaus.jackson.JsonParseException; +import org.codehaus.jackson.JsonProcessingException; +import org.codehaus.jackson.Version; import org.codehaus.jackson.map.JsonMappingException; +import org.codehaus.jackson.map.JsonSerializer; +import org.codehaus.jackson.map.Module; import org.codehaus.jackson.map.ObjectMapper; +import org.codehaus.jackson.map.SerializerProvider; +import org.codehaus.jackson.map.module.SimpleModule; abstract public class AbstractJDBCMessageStore implements MessageStore, DurableConfigurationStore { @@ -160,6 +168,28 @@ abstract public class AbstractJDBCMessageStore implements MessageStore, DurableC protected static final Charset UTF8_CHARSET = Charset.forName("UTF-8"); + + private static final Module _module; + static + { + SimpleModule module= new SimpleModule("ConfiguredObjectSerializer", new Version(1,0,0,null)); + + final JsonSerializer<ConfiguredObject> serializer = new JsonSerializer<ConfiguredObject>() + { + @Override + public void serialize(final ConfiguredObject value, + final JsonGenerator jgen, + final SerializerProvider provider) + throws IOException, JsonProcessingException + { + jgen.writeString(value.getId().toString()); + } + }; + module.addSerializer(ConfiguredObject.class, serializer); + + _module = module; + } + protected final EventManager _eventManager = new EventManager(); protected final StateManager _stateManager; @@ -1994,7 +2024,10 @@ abstract public class AbstractJDBCMessageStore implements MessageStore, DurableC else { final Map<String, Object> attributes = configuredObject.getAttributes(); - byte[] attributesAsBytes = new ObjectMapper().writeValueAsBytes(attributes); + final ObjectMapper objectMapper = new ObjectMapper(); + objectMapper.registerModule(_module); + byte[] attributesAsBytes = objectMapper.writeValueAsBytes(attributes); + ByteArrayInputStream bis = new ByteArrayInputStream(attributesAsBytes); insertStmt.setBinaryStream(3, bis, attributesAsBytes.length); } @@ -2129,12 +2162,6 @@ abstract public class AbstractJDBCMessageStore implements MessageStore, DurableC } } - @Override - public void update(ConfiguredObjectRecord... records) throws StoreException - { - update(false, records); - } - public void update(boolean createIfNecessary, ConfiguredObjectRecord... records) throws StoreException { if (_stateManager.isInState(State.ACTIVE) || _stateManager.isInState(State.ACTIVATING)) @@ -2176,6 +2203,8 @@ abstract public class AbstractJDBCMessageStore implements MessageStore, DurableC ResultSet rs = stmt.executeQuery(); try { + final ObjectMapper objectMapper = new ObjectMapper(); + objectMapper.registerModule(_module); if (rs.next()) { PreparedStatement stmt2 = conn.prepareStatement(UPDATE_CONFIGURED_OBJECTS); @@ -2184,7 +2213,7 @@ abstract public class AbstractJDBCMessageStore implements MessageStore, DurableC stmt2.setString(1, configuredObject.getType()); if (configuredObject.getAttributes() != null) { - byte[] attributesAsBytes = (new ObjectMapper()).writeValueAsBytes( + byte[] attributesAsBytes = objectMapper.writeValueAsBytes( configuredObject.getAttributes()); ByteArrayInputStream bis = new ByteArrayInputStream(attributesAsBytes); stmt2.setBinaryStream(2, bis, attributesAsBytes.length); @@ -2215,7 +2244,7 @@ abstract public class AbstractJDBCMessageStore implements MessageStore, DurableC else { final Map<String, Object> attributes = configuredObject.getAttributes(); - byte[] attributesAsBytes = new ObjectMapper().writeValueAsBytes(attributes); + byte[] attributesAsBytes = objectMapper.writeValueAsBytes(attributes); ByteArrayInputStream bis = new ByteArrayInputStream(attributesAsBytes); insertStmt.setBinaryStream(3, bis, attributesAsBytes.length); } diff --git a/qpid/java/broker-core/src/main/java/org/apache/qpid/server/store/DurableConfigurationStore.java b/qpid/java/broker-core/src/main/java/org/apache/qpid/server/store/DurableConfigurationStore.java index 472c0661fa..5921abc324 100755 --- a/qpid/java/broker-core/src/main/java/org/apache/qpid/server/store/DurableConfigurationStore.java +++ b/qpid/java/broker-core/src/main/java/org/apache/qpid/server/store/DurableConfigurationStore.java @@ -86,7 +86,6 @@ public interface DurableConfigurationStore void update(UUID id, String type, Map<String, Object> attributes) throws StoreException; - public void update(ConfiguredObjectRecord... records) throws StoreException; public void update(boolean createIfNecessary, ConfiguredObjectRecord... records) throws StoreException; diff --git a/qpid/java/broker-core/src/main/java/org/apache/qpid/server/store/DurableConfigurationStoreHelper.java b/qpid/java/broker-core/src/main/java/org/apache/qpid/server/store/DurableConfigurationStoreHelper.java index 77af1f92fd..f914389b0e 100644 --- a/qpid/java/broker-core/src/main/java/org/apache/qpid/server/store/DurableConfigurationStoreHelper.java +++ b/qpid/java/broker-core/src/main/java/org/apache/qpid/server/store/DurableConfigurationStoreHelper.java @@ -20,6 +20,7 @@ */ package org.apache.qpid.server.store; +import java.security.PrivilegedAction; import java.util.Arrays; import java.util.Collection; import java.util.HashMap; @@ -32,10 +33,14 @@ import java.util.Set; import org.apache.qpid.server.binding.BindingImpl; import org.apache.qpid.server.exchange.ExchangeImpl; import org.apache.qpid.server.model.Binding; +import org.apache.qpid.server.model.ConfiguredObject; import org.apache.qpid.server.model.Exchange; import org.apache.qpid.server.model.LifetimePolicy; import org.apache.qpid.server.model.Queue; import org.apache.qpid.server.queue.AMQQueue; +import org.apache.qpid.server.security.*; + +import javax.security.auth.Subject; public class DurableConfigurationStoreHelper { @@ -47,41 +52,25 @@ public class DurableConfigurationStoreHelper public static void updateQueue(DurableConfigurationStore store, AMQQueue queue) { - Map<String, Object> attributesMap = new LinkedHashMap<String, Object>(); - - if (queue.getAlternateExchange() != null) + Map<String, Object> attributesMap = queue.getActualAttributes(); + attributesMap.remove(ConfiguredObject.ID); + if(queue.getAlternateExchange() != null) { attributesMap.put(Queue.ALTERNATE_EXCHANGE, queue.getAlternateExchange().getId()); } - - Collection<String> availableAttrs = queue.getAvailableAttributes(); - - for(String attrName : availableAttrs) - { - if(!QUEUE_ARGUMENTS_EXCLUDES.contains(attrName)) - { - attributesMap.put(attrName, queue.getAttribute(attrName)); - } - } - store.update(queue.getId(), QUEUE, attributesMap); } public static void createQueue(DurableConfigurationStore store, AMQQueue<?> queue) { - Map<String, Object> attributesMap = new HashMap<String, Object>(); - if (queue.getAlternateExchange() != null) + + Map<String, Object> attributesMap = queue.getActualAttributes(); + attributesMap.remove(ConfiguredObject.ID); + if(queue.getAlternateExchange() != null) { attributesMap.put(Queue.ALTERNATE_EXCHANGE, queue.getAlternateExchange().getId()); } - for(String attrName : queue.getAvailableAttributes()) - { - if(!QUEUE_ARGUMENTS_EXCLUDES.contains(attrName)) - { - attributesMap.put(attrName, queue.getAttribute(attrName)); - } - } store.create(queue.getId(), QUEUE, attributesMap); } @@ -92,11 +81,8 @@ public class DurableConfigurationStoreHelper public static void createExchange(DurableConfigurationStore store, ExchangeImpl exchange) { - Map<String, Object> attributesMap = new HashMap<String, Object>(); - attributesMap.put(Exchange.NAME, exchange.getName()); - attributesMap.put(Exchange.TYPE, exchange.getTypeName()); - attributesMap.put(Exchange.LIFETIME_POLICY, exchange.isAutoDelete() ? LifetimePolicy.DELETE_ON_NO_OUTBOUND_LINKS.name() - : LifetimePolicy.PERMANENT.name()); + Map<String, Object> attributesMap = exchange.getActualAttributes(); + attributesMap.remove(ConfiguredObject.ID); store.create(exchange.getId(), EXCHANGE, attributesMap); @@ -108,16 +94,17 @@ public class DurableConfigurationStoreHelper store.remove(exchange.getId(), EXCHANGE); } - public static void createBinding(DurableConfigurationStore store, BindingImpl binding) + public static void createBinding(DurableConfigurationStore store, final BindingImpl binding) { - Map<String, Object> attributesMap = new HashMap<String, Object>(); - attributesMap.put(Binding.NAME, binding.getBindingKey()); - attributesMap.put(Binding.EXCHANGE, binding.getExchange().getId()); - attributesMap.put(Binding.QUEUE, binding.getAMQQueue().getId()); - Map<String, Object> arguments = binding.getArguments(); - if (arguments != null) + Map<String, Object> attributesMap = binding.getActualAttributes(); + attributesMap.remove(ConfiguredObject.ID); + if(!attributesMap.containsKey(Binding.EXCHANGE)) + { + attributesMap.put(Binding.EXCHANGE, binding.getExchange()); + } + if(!attributesMap.containsKey(Binding.QUEUE)) { - attributesMap.put(Binding.ARGUMENTS, arguments); + attributesMap.put(Binding.QUEUE, binding.getQueue()); } store.create(binding.getId(), BINDING, attributesMap); diff --git a/qpid/java/broker-core/src/main/java/org/apache/qpid/server/store/JsonFileConfigStore.java b/qpid/java/broker-core/src/main/java/org/apache/qpid/server/store/JsonFileConfigStore.java index 76a4aae2a6..2f869201cf 100644 --- a/qpid/java/broker-core/src/main/java/org/apache/qpid/server/store/JsonFileConfigStore.java +++ b/qpid/java/broker-core/src/main/java/org/apache/qpid/server/store/JsonFileConfigStore.java @@ -464,12 +464,6 @@ public class JsonFileConfigStore implements DurableConfigurationStore } @Override - public void update(final ConfiguredObjectRecord... records) throws StoreException - { - update(false, records); - } - - @Override public void update(final boolean createIfNecessary, final ConfiguredObjectRecord... records) throws StoreException { diff --git a/qpid/java/broker-core/src/main/java/org/apache/qpid/server/store/NullMessageStore.java b/qpid/java/broker-core/src/main/java/org/apache/qpid/server/store/NullMessageStore.java index 9100d623cd..c579a27731 100644 --- a/qpid/java/broker-core/src/main/java/org/apache/qpid/server/store/NullMessageStore.java +++ b/qpid/java/broker-core/src/main/java/org/apache/qpid/server/store/NullMessageStore.java @@ -37,11 +37,6 @@ public abstract class NullMessageStore implements MessageStore, DurableConfigura } @Override - public void update(ConfiguredObjectRecord... records) - { - } - - @Override public void update(boolean createIfNecessary, ConfiguredObjectRecord... records) { } diff --git a/qpid/java/broker-core/src/test/java/org/apache/qpid/server/store/AbstractDurableConfigurationStoreTestCase.java b/qpid/java/broker-core/src/test/java/org/apache/qpid/server/store/AbstractDurableConfigurationStoreTestCase.java index 931fe36d5d..76d460b296 100644 --- a/qpid/java/broker-core/src/test/java/org/apache/qpid/server/store/AbstractDurableConfigurationStoreTestCase.java +++ b/qpid/java/broker-core/src/test/java/org/apache/qpid/server/store/AbstractDurableConfigurationStoreTestCase.java @@ -23,6 +23,7 @@ package org.apache.qpid.server.store; import static org.mockito.Matchers.any; import static org.mockito.Matchers.anyMap; import static org.mockito.Matchers.anyString; +import static org.mockito.Matchers.argThat; import static org.mockito.Matchers.eq; import static org.mockito.Mockito.mock; import static org.mockito.Mockito.never; @@ -54,6 +55,7 @@ import org.apache.qpid.server.store.Transaction.Record; import org.apache.qpid.test.utils.QpidTestCase; import org.apache.qpid.util.FileUtils; import org.mockito.ArgumentCaptor; +import org.mockito.ArgumentMatcher; import org.mockito.invocation.InvocationOnMock; import org.mockito.stubbing.Answer; @@ -200,7 +202,31 @@ public abstract class AbstractDurableConfigurationStoreTestCase extends QpidTest map.put(org.apache.qpid.server.model.Binding.ARGUMENTS,_bindingArgs); verify(_recoveryHandler).configuredObject(eq(binding.getId()), eq(BINDING), - eq(map)); + argThat(new IgnoreCreatedByMatcher(map))); + } + + private static class IgnoreCreatedByMatcher extends ArgumentMatcher<Map<String,Object>> + { + private final Map<String,Object> _matchingMap; + + private IgnoreCreatedByMatcher(final Map<String, Object> matchingMap) + { + _matchingMap = matchingMap; + } + + @Override + public boolean matches(final Object argument) + { + if(argument instanceof Map) + { + Map<String,Object> arg = new HashMap<String, Object>((Map<String,Object>) argument); + arg.remove("createdBy"); + arg.remove("createdTime"); + return arg.equals(_matchingMap); + + } + return false; + } } public void testUnbindQueue() throws Exception @@ -372,6 +398,10 @@ public abstract class AbstractDurableConfigurationStoreTestCase extends QpidTest when(queue.getVirtualHost()).thenReturn(vh); final Map<String,Object> attributes = arguments == null ? new LinkedHashMap<String, Object>() : new LinkedHashMap<String, Object>(arguments); attributes.put(Queue.NAME, queueName); + if(alternateExchange != null) + { + attributes.put(Queue.ALTERNATE_EXCHANGE, alternateExchange); + } if(exclusive) { when(queue.getOwner()).thenReturn(queueOwner); @@ -393,16 +423,24 @@ public abstract class AbstractDurableConfigurationStoreTestCase extends QpidTest } }); + when(queue.getActualAttributes()).thenReturn(attributes); return queue; } private ExchangeImpl createTestExchange() { ExchangeImpl exchange = mock(ExchangeImpl.class); + Map<String,Object> actualAttributes = new HashMap<String, Object>(); + actualAttributes.put("id", _exchangeId); + actualAttributes.put("name", getName()); + actualAttributes.put("type", getName() + "Type"); + actualAttributes.put("lifetimePolicy", LifetimePolicy.DELETE_ON_NO_OUTBOUND_LINKS); + when(exchange.getActualAttributes()).thenReturn(actualAttributes); when(exchange.getName()).thenReturn(getName()); when(exchange.getTypeName()).thenReturn(getName() + "Type"); when(exchange.isAutoDelete()).thenReturn(true); when(exchange.getId()).thenReturn(_exchangeId); + return exchange; } diff --git a/qpid/java/broker-core/src/test/java/org/apache/qpid/server/virtualhost/DurableConfigurationRecovererTest.java b/qpid/java/broker-core/src/test/java/org/apache/qpid/server/virtualhost/DurableConfigurationRecovererTest.java index 928ed6be74..9f1f6f48c0 100644 --- a/qpid/java/broker-core/src/test/java/org/apache/qpid/server/virtualhost/DurableConfigurationRecovererTest.java +++ b/qpid/java/broker-core/src/test/java/org/apache/qpid/server/virtualhost/DurableConfigurationRecovererTest.java @@ -53,6 +53,7 @@ import org.mockito.invocation.InvocationOnMock; import org.mockito.stubbing.Answer; import static org.mockito.Matchers.any; +import static org.mockito.Matchers.anyBoolean; import static org.mockito.Matchers.eq; import static org.mockito.Mockito.doAnswer; import static org.mockito.Mockito.doThrow; @@ -338,7 +339,8 @@ public class DurableConfigurationRecovererTest extends QpidTestCase "x-filter-jms-selector", "wibble")); - doThrow(new RuntimeException("Update Should not be called")).when(_store).update(any(ConfiguredObjectRecord[].class)); + doThrow(new RuntimeException("Update Should not be called")) + .when(_store).update(anyBoolean(), any(ConfiguredObjectRecord[].class)); _durableConfigurationRecoverer.completeConfigurationRecovery(); } @@ -442,12 +444,13 @@ public class DurableConfigurationRecovererTest extends QpidTestCase public Object answer(InvocationOnMock invocation) throws Throwable { Object[] args = invocation.getArguments(); + final HashSet actual = new HashSet(Arrays.asList(args[1])); assertEquals("Updated records are not as expected", new HashSet(Arrays.asList( - expected)), new HashSet(Arrays.asList(args))); + expected)), actual); return null; } - }).when(_store).update(any(ConfiguredObjectRecord[].class)); + }).when(_store).update(anyBoolean(), any(ConfiguredObjectRecord[].class)); } private Map<String,Object> createBinding(String bindingKey, UUID exchangeId, UUID queueId, String... args) diff --git a/qpid/java/build.xml b/qpid/java/build.xml index 219029b908..75652d868a 100644 --- a/qpid/java/build.xml +++ b/qpid/java/build.xml @@ -36,7 +36,7 @@ <property name="modules.core" value="qpid-test-utils common management/common amqp-1-0-common broker-core broker client amqp-1-0-client amqp-1-0-client-jms amqp-1-0-client-websocket tools"/> <property name="modules.examples" value="client/example management/example amqp-1-0-client/example amqp-1-0-client-jms/example"/> - <property name="modules.tests" value="systests perftests"/> + <property name="modules.tests" value="systests perftests qpid-perftests-systests"/> <property name="modules.plugin" value="${broker-plugins} ${client-plugins}"/> <property name="modules.jca" value="jca"/> <property name="modules" value="${modules.core} ${modules.examples} diff --git a/qpid/java/perftests/pom.xml b/qpid/java/perftests/pom.xml index 9fc1c95848..c21e2d6c63 100644 --- a/qpid/java/perftests/pom.xml +++ b/qpid/java/perftests/pom.xml @@ -20,19 +20,14 @@ <parent> <groupId>org.apache.qpid</groupId> - <artifactId>qpid-systests-parent</artifactId> + <artifactId>qpid-java-build</artifactId> <version>0.28-SNAPSHOT</version> - <relativePath>../qpid-systests-parent/pom.xml</relativePath> </parent> <artifactId>qpid-perftests</artifactId> <name>Qpid Performance Tests</name> <description>Performance testing configuration, code and tests</description> - <properties> - <test.systest.resource.directory>${basedir}/../systests</test.systest.resource.directory> - </properties> - <dependencies> <!-- client deps --> <dependency> @@ -77,13 +72,6 @@ <!-- test deps --> <dependency> <groupId>org.apache.qpid</groupId> - <artifactId>qpid-systests</artifactId> - <version>${project.version}</version> - <scope>test</scope> - </dependency> - - <dependency> - <groupId>org.apache.qpid</groupId> <artifactId>qpid-test-utils</artifactId> <version>${project.version}</version> <scope>test</scope> @@ -91,6 +79,19 @@ </dependencies> <build> + + <resources> + <resource> + <directory>src/main/resources</directory> + </resource> + <resource> + <directory>src/main/java</directory> + <excludes> + <exclude>**/*.java/</exclude> + </excludes> + </resource> + </resources> + <testResources> <testResource> <directory>src/test/java</directory> diff --git a/qpid/java/perftests/src/test/java/org/apache/qpid/disttest/PerfTestConstants.java b/qpid/java/perftests/src/test/java/org/apache/qpid/disttest/PerfTestConstants.java new file mode 100644 index 0000000000..5e56f3a89f --- /dev/null +++ b/qpid/java/perftests/src/test/java/org/apache/qpid/disttest/PerfTestConstants.java @@ -0,0 +1,28 @@ +/* + * Licensed to the Apache Software Foundation (ASF) under one + * or more contributor license agreements. See the NOTICE file + * distributed with this work for additional information + * regarding copyright ownership. The ASF licenses this file + * to you under the Apache License, Version 2.0 (the + * "License"); you may not use this file except in compliance + * with the License. You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, + * software distributed under the License is distributed on an + * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY + * KIND, either express or implied. See the License for the + * specific language governing permissions and limitations + * under the License. + * + */ +package org.apache.qpid.disttest; + +public abstract class PerfTestConstants +{ + public static final long REGISTRATION_TIMEOUT = 20000; + public static final long COMMAND_RESPONSE_TIMEOUT = 30000; + public static final long TEST_RESULT_TIMEOUT = 20000; + +} diff --git a/qpid/java/perftests/src/test/java/org/apache/qpid/disttest/controller/ControllerTest.java b/qpid/java/perftests/src/test/java/org/apache/qpid/disttest/controller/ControllerTest.java index f773c727a1..e482268ab2 100644 --- a/qpid/java/perftests/src/test/java/org/apache/qpid/disttest/controller/ControllerTest.java +++ b/qpid/java/perftests/src/test/java/org/apache/qpid/disttest/controller/ControllerTest.java @@ -19,8 +19,8 @@ */ package org.apache.qpid.disttest.controller; -import static org.apache.qpid.systest.disttest.SystemTestConstants.COMMAND_RESPONSE_TIMEOUT; -import static org.apache.qpid.systest.disttest.SystemTestConstants.REGISTRATION_TIMEOUT; +import static org.apache.qpid.disttest.PerfTestConstants.COMMAND_RESPONSE_TIMEOUT; +import static org.apache.qpid.disttest.PerfTestConstants.REGISTRATION_TIMEOUT; import static org.mockito.Matchers.anyString; import static org.mockito.Matchers.eq; import static org.mockito.Matchers.isA; diff --git a/qpid/java/pom.xml b/qpid/java/pom.xml index 3c0ee07b1a..e4b02850e5 100644 --- a/qpid/java/pom.xml +++ b/qpid/java/pom.xml @@ -38,6 +38,13 @@ <url>http://svn.apache.org/viewvc/qpid/trunk/qpid/java</url> </scm> + <distributionManagement> + <site> + <id>${project.artifactId}-site</id> + <url>${project.baseUri}</url> + </site> + </distributionManagement> + <properties> <!-- javac source/target properties --> <java.source>1.6</java.source> @@ -101,6 +108,7 @@ <module>qpid-test-utils</module> <module>systests</module> <module>perftests</module> + <module>qpid-perftests-systests</module> <module>perftests/visualisation-jfc</module> <module>bdbstore</module> @@ -323,6 +331,13 @@ <plugin> <groupId>org.apache.rat</groupId> <artifactId>apache-rat-plugin</artifactId> + <configuration> + <excludes> + <exclude>build/**</exclude> + <exclude>lib/**</exclude> + <exclude>test-profiles/test_resources/ssl/**</exclude> + </excludes> + </configuration> </plugin> </plugins> @@ -359,6 +374,15 @@ </reports> </reportSet> </reportSets> + <configuration> + <alwaysGenerateSurefireReport>false</alwaysGenerateSurefireReport> + </configuration> + </plugin> + + <plugin> + <groupId>org.apache.maven.plugins</groupId> + <artifactId>maven-jxr-plugin</artifactId> + <version>${maven-jxr-plugin-version}</version> </plugin> <plugin> @@ -371,6 +395,13 @@ <groupId>org.apache.rat</groupId> <artifactId>apache-rat-plugin</artifactId> <version>${apache-rat-plugin-version}</version> + <configuration> + <excludes> + <exclude>build/**</exclude> + <exclude>lib/**</exclude> + <exclude>test-profiles/test_resources/ssl/**</exclude> + </excludes> + </configuration> </plugin> </plugins> diff --git a/qpid/java/qpid-perftests-systests/build.xml b/qpid/java/qpid-perftests-systests/build.xml new file mode 100644 index 0000000000..07d2263e43 --- /dev/null +++ b/qpid/java/qpid-perftests-systests/build.xml @@ -0,0 +1,46 @@ +<!-- + - + - Licensed to the Apache Software Foundation (ASF) under one + - or more contributor license agreements. See the NOTICE file + - distributed with this work for additional information + - regarding copyright ownership. The ASF licenses this file + - to you under the Apache License, Version 2.0 (the + - "License"); you may not use this file except in compliance + - with the License. You may obtain a copy of the License at + - + - http://www.apache.org/licenses/LICENSE-2.0 + - + - Unless required by applicable law or agreed to in writing, + - software distributed under the License is distributed on an + - "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY + - KIND, either express or implied. See the License for the + - specific language governing permissions and limitations + - under the License. + - + --> +<project name="Performance Tests System Tests" default="build"> + <condition property="perftests.optional.test.depends" value="bdbstore" else=""> + <or> + <and> + <contains string="${modules.opt}" substring="bdbstore"/> + <contains string="${profile}" substring="bdb"/> + </and> + <and> + <istrue value="${optional}"/> + <contains string="${profile}" substring="bdb"/> + </and> + </or> + </condition> + + <property name="module.depends" value="client common perftests systests qpid-test-utils"/> + <property name="module.test.depends" value="perftests systests broker-core broker-plugins/memory-store broker-plugins/derby-store qpid-test-utils management/common broker-plugins/amqp-0-8-protocol broker-plugins/amqp-0-10-protocol broker-plugins/amqp-1-0-protocol ${perftests.optional.test.depends}"/> + + <import file="../module.xml"/> + + <property name="xms" value="-Xms256m"/> + <property name="xmx" value="-Xmx1024m"/> + <property name="test.logging.level" value="-Damqj.test.logging.level=info"/> + <property name="qpid.logging.level" value="-Damqj.logging.level=warn"/> + <property name="log4j.config" value="-Dlog4j.configuration=perftests.log4j"/> + <property name="properties" value="perftests.properties"/> +</project> diff --git a/qpid/java/qpid-perftests-systests/pom.xml b/qpid/java/qpid-perftests-systests/pom.xml new file mode 100644 index 0000000000..6856fd9d17 --- /dev/null +++ b/qpid/java/qpid-perftests-systests/pom.xml @@ -0,0 +1,116 @@ +<?xml version="1.0" encoding="UTF-8"?> +<!-- + Licensed to the Apache Software Foundation (ASF) under one or more + contributor license agreements. See the NOTICE file distributed with + this work for additional information regarding copyright ownership. + The ASF licenses this file to You under the Apache License, Version 2.0 + (the "License"); you may not use this file except in compliance with + the License. You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + + Unless required by applicable law or agreed to in writing, software + distributed under the License is distributed on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + See the License for the specific language governing permissions and + limitations under the License. +--> +<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/maven-v4_0_0.xsd"> + <modelVersion>4.0.0</modelVersion> + + <parent> + <groupId>org.apache.qpid</groupId> + <artifactId>qpid-systests-parent</artifactId> + <version>0.28-SNAPSHOT</version> + <relativePath>../qpid-systests-parent/pom.xml</relativePath> + </parent> + + <artifactId>qpid-perftests-systests</artifactId> + <name>Qpid Performance Test System Tests</name> + <description>System testing using the performance testing module</description> + + <properties> + <test.systest.resource.directory>${basedir}/../systests</test.systest.resource.directory> + </properties> + + <dependencies> + <dependency> + <groupId>org.apache.qpid</groupId> + <artifactId>qpid-perftests</artifactId> + <version>${project.version}</version> + </dependency> + + <dependency> + <groupId>org.apache.qpid</groupId> + <artifactId>qpid-systests</artifactId> + <version>${project.version}</version> + </dependency> + + <!-- client deps --> + <dependency> + <groupId>org.apache.qpid</groupId> + <artifactId>qpid-client</artifactId> + <version>${project.version}</version> + </dependency> + + <dependency> + <groupId>org.apache.geronimo.specs</groupId> + <artifactId>geronimo-jms_1.1_spec</artifactId> + <scope>provided</scope> + </dependency> + + <!-- other deps --> + <dependency> + <groupId>commons-lang</groupId> + <artifactId>commons-lang</artifactId> + </dependency> + + <dependency> + <groupId>commons-collections</groupId> + <artifactId>commons-collections</artifactId> + </dependency> + + <dependency> + <groupId>commons-beanutils</groupId> + <artifactId>commons-beanutils-core</artifactId> + </dependency> + + <dependency> + <groupId>com.google.code.gson</groupId> + <artifactId>gson</artifactId> + </dependency> + + <dependency> + <groupId>org.apache.derby</groupId> + <artifactId>derby</artifactId> + <scope>runtime</scope> + </dependency> + + </dependencies> + + <build> + <testResources> + <testResource> + <directory>src/test/java</directory> + <excludes> + <exclude>**/*.java</exclude> + </excludes> + </testResource> + <testResource> + <directory>src/test/resources</directory> + </testResource> + </testResources> + + <plugins> + <plugin> + <groupId>org.apache.maven.plugins</groupId> + <artifactId>maven-deploy-plugin</artifactId> + <!--version specified in parent pluginManagement --> + <configuration> + <skip>true</skip> + </configuration> + </plugin> + </plugins> + + </build> +</project> diff --git a/qpid/java/qpid-perftests-systests/src/main/java/org/apache/qpid/systest/disttest/ConfigFileTestHelper.java b/qpid/java/qpid-perftests-systests/src/main/java/org/apache/qpid/systest/disttest/ConfigFileTestHelper.java new file mode 100644 index 0000000000..a4f4cab018 --- /dev/null +++ b/qpid/java/qpid-perftests-systests/src/main/java/org/apache/qpid/systest/disttest/ConfigFileTestHelper.java @@ -0,0 +1,48 @@ +/* + * Licensed to the Apache Software Foundation (ASF) under one + * or more contributor license agreements. See the NOTICE file + * distributed with this work for additional information + * regarding copyright ownership. The ASF licenses this file + * to you under the Apache License, Version 2.0 (the + * "License"); you may not use this file except in compliance + * with the License. You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, + * software distributed under the License is distributed on an + * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY + * KIND, either express or implied. See the License for the + * specific language governing permissions and limitations + * under the License. + * + */ +package org.apache.qpid.systest.disttest; + +import java.io.InputStream; +import java.io.InputStreamReader; +import java.io.Reader; + +import org.apache.qpid.disttest.controller.config.Config; +import org.apache.qpid.disttest.controller.config.ConfigReader; + +public class ConfigFileTestHelper +{ + public static Reader getConfigFileReader(Class<?> testClass, String resourceName) + { + InputStream inputStream = testClass.getResourceAsStream(resourceName); + if(inputStream == null) + { + throw new RuntimeException("Can't find resource " + resourceName + " using classloader of class " + testClass); + } + Reader reader = new InputStreamReader(inputStream); + return reader; + } + + public static Config getConfigFromResource(Class<?> testClass, String resourceName) + { + ConfigReader configReader = new ConfigReader(); + Config config = configReader.readConfig(getConfigFileReader(testClass, resourceName)); + return config; + } +} diff --git a/qpid/java/perftests/src/test/java/org/apache/qpid/systest/disttest/DistributedTestSystemTestBase.java b/qpid/java/qpid-perftests-systests/src/main/java/org/apache/qpid/systest/disttest/DistributedTestSystemTestBase.java index 96daf64526..96daf64526 100644 --- a/qpid/java/perftests/src/test/java/org/apache/qpid/systest/disttest/DistributedTestSystemTestBase.java +++ b/qpid/java/qpid-perftests-systests/src/main/java/org/apache/qpid/systest/disttest/DistributedTestSystemTestBase.java diff --git a/qpid/java/perftests/src/test/java/org/apache/qpid/systest/disttest/QpidQueueCreatorTest.java b/qpid/java/qpid-perftests-systests/src/main/java/org/apache/qpid/systest/disttest/QpidQueueCreatorTest.java index 59396d46c0..59396d46c0 100644 --- a/qpid/java/perftests/src/test/java/org/apache/qpid/systest/disttest/QpidQueueCreatorTest.java +++ b/qpid/java/qpid-perftests-systests/src/main/java/org/apache/qpid/systest/disttest/QpidQueueCreatorTest.java diff --git a/qpid/java/perftests/src/test/java/org/apache/qpid/systest/disttest/SystemTestConstants.java b/qpid/java/qpid-perftests-systests/src/main/java/org/apache/qpid/systest/disttest/SystemTestConstants.java index b06ab0c735..b06ab0c735 100644 --- a/qpid/java/perftests/src/test/java/org/apache/qpid/systest/disttest/SystemTestConstants.java +++ b/qpid/java/qpid-perftests-systests/src/main/java/org/apache/qpid/systest/disttest/SystemTestConstants.java diff --git a/qpid/java/perftests/src/test/java/org/apache/qpid/systest/disttest/clientonly/BasicDistributedClientTest.java b/qpid/java/qpid-perftests-systests/src/main/java/org/apache/qpid/systest/disttest/clientonly/BasicDistributedClientTest.java index d599bdc5c4..d599bdc5c4 100644 --- a/qpid/java/perftests/src/test/java/org/apache/qpid/systest/disttest/clientonly/BasicDistributedClientTest.java +++ b/qpid/java/qpid-perftests-systests/src/main/java/org/apache/qpid/systest/disttest/clientonly/BasicDistributedClientTest.java diff --git a/qpid/java/perftests/src/test/java/org/apache/qpid/systest/disttest/clientonly/ConsumerParticipantTest.java b/qpid/java/qpid-perftests-systests/src/main/java/org/apache/qpid/systest/disttest/clientonly/ConsumerParticipantTest.java index a3c0430865..a3c0430865 100644 --- a/qpid/java/perftests/src/test/java/org/apache/qpid/systest/disttest/clientonly/ConsumerParticipantTest.java +++ b/qpid/java/qpid-perftests-systests/src/main/java/org/apache/qpid/systest/disttest/clientonly/ConsumerParticipantTest.java diff --git a/qpid/java/perftests/src/test/java/org/apache/qpid/systest/disttest/clientonly/ControllerQueue.java b/qpid/java/qpid-perftests-systests/src/main/java/org/apache/qpid/systest/disttest/clientonly/ControllerQueue.java index 75783eef4b..75783eef4b 100644 --- a/qpid/java/perftests/src/test/java/org/apache/qpid/systest/disttest/clientonly/ControllerQueue.java +++ b/qpid/java/qpid-perftests-systests/src/main/java/org/apache/qpid/systest/disttest/clientonly/ControllerQueue.java diff --git a/qpid/java/perftests/src/test/java/org/apache/qpid/systest/disttest/clientonly/DistributedClientTest.java b/qpid/java/qpid-perftests-systests/src/main/java/org/apache/qpid/systest/disttest/clientonly/DistributedClientTest.java index 5b5a60ac43..5b5a60ac43 100644 --- a/qpid/java/perftests/src/test/java/org/apache/qpid/systest/disttest/clientonly/DistributedClientTest.java +++ b/qpid/java/qpid-perftests-systests/src/main/java/org/apache/qpid/systest/disttest/clientonly/DistributedClientTest.java diff --git a/qpid/java/perftests/src/test/java/org/apache/qpid/systest/disttest/clientonly/MessageProviderTest.java b/qpid/java/qpid-perftests-systests/src/main/java/org/apache/qpid/systest/disttest/clientonly/MessageProviderTest.java index dcbff6518b..dcbff6518b 100644 --- a/qpid/java/perftests/src/test/java/org/apache/qpid/systest/disttest/clientonly/MessageProviderTest.java +++ b/qpid/java/qpid-perftests-systests/src/main/java/org/apache/qpid/systest/disttest/clientonly/MessageProviderTest.java diff --git a/qpid/java/perftests/src/test/java/org/apache/qpid/systest/disttest/clientonly/ProducerParticipantTest.java b/qpid/java/qpid-perftests-systests/src/main/java/org/apache/qpid/systest/disttest/clientonly/ProducerParticipantTest.java index 54bb9efa98..54bb9efa98 100644 --- a/qpid/java/perftests/src/test/java/org/apache/qpid/systest/disttest/clientonly/ProducerParticipantTest.java +++ b/qpid/java/qpid-perftests-systests/src/main/java/org/apache/qpid/systest/disttest/clientonly/ProducerParticipantTest.java diff --git a/qpid/java/perftests/src/test/java/org/apache/qpid/systest/disttest/controllerandclient/ControllerAndClientTest.java b/qpid/java/qpid-perftests-systests/src/main/java/org/apache/qpid/systest/disttest/controllerandclient/ControllerAndClientTest.java index ddb4cb7e51..75d0941c57 100644 --- a/qpid/java/perftests/src/test/java/org/apache/qpid/systest/disttest/controllerandclient/ControllerAndClientTest.java +++ b/qpid/java/qpid-perftests-systests/src/main/java/org/apache/qpid/systest/disttest/controllerandclient/ControllerAndClientTest.java @@ -32,7 +32,7 @@ import javax.jms.Queue; import javax.jms.Session; import javax.naming.NamingException; -import org.apache.qpid.disttest.ConfigFileTestHelper; +import org.apache.qpid.systest.disttest.ConfigFileTestHelper; import org.apache.qpid.disttest.client.Client; import org.apache.qpid.disttest.client.ClientState; import org.apache.qpid.disttest.controller.Controller; diff --git a/qpid/java/perftests/src/test/java/org/apache/qpid/systest/disttest/controllerandclient/iteratingFeature.json b/qpid/java/qpid-perftests-systests/src/main/java/org/apache/qpid/systest/disttest/controllerandclient/iteratingFeature.json index 89123302b7..89123302b7 100644 --- a/qpid/java/perftests/src/test/java/org/apache/qpid/systest/disttest/controllerandclient/iteratingFeature.json +++ b/qpid/java/qpid-perftests-systests/src/main/java/org/apache/qpid/systest/disttest/controllerandclient/iteratingFeature.json diff --git a/qpid/java/perftests/src/test/java/org/apache/qpid/systest/disttest/controllerandclient/produceClient.json b/qpid/java/qpid-perftests-systests/src/main/java/org/apache/qpid/systest/disttest/controllerandclient/produceClient.json index 605e5cb585..605e5cb585 100644 --- a/qpid/java/perftests/src/test/java/org/apache/qpid/systest/disttest/controllerandclient/produceClient.json +++ b/qpid/java/qpid-perftests-systests/src/main/java/org/apache/qpid/systest/disttest/controllerandclient/produceClient.json diff --git a/qpid/java/perftests/src/test/java/org/apache/qpid/systest/disttest/controllerandclient/producerAndConsumerInSeparateClients.json b/qpid/java/qpid-perftests-systests/src/main/java/org/apache/qpid/systest/disttest/controllerandclient/producerAndConsumerInSeparateClients.json index a008dc40d8..a008dc40d8 100644 --- a/qpid/java/perftests/src/test/java/org/apache/qpid/systest/disttest/controllerandclient/producerAndConsumerInSeparateClients.json +++ b/qpid/java/qpid-perftests-systests/src/main/java/org/apache/qpid/systest/disttest/controllerandclient/producerAndConsumerInSeparateClients.json diff --git a/qpid/java/perftests/src/test/java/org/apache/qpid/systest/disttest/controllerandclient/producerAndThreeConsumersInSeparateClients.json b/qpid/java/qpid-perftests-systests/src/main/java/org/apache/qpid/systest/disttest/controllerandclient/producerAndThreeConsumersInSeparateClients.json index f94c4f0ae0..f94c4f0ae0 100644 --- a/qpid/java/perftests/src/test/java/org/apache/qpid/systest/disttest/controllerandclient/producerAndThreeConsumersInSeparateClients.json +++ b/qpid/java/qpid-perftests-systests/src/main/java/org/apache/qpid/systest/disttest/controllerandclient/producerAndThreeConsumersInSeparateClients.json diff --git a/qpid/java/perftests/src/test/java/org/apache/qpid/systest/disttest/controllerandclient/testWithTwoTests.json b/qpid/java/qpid-perftests-systests/src/main/java/org/apache/qpid/systest/disttest/controllerandclient/testWithTwoTests.json index 4abd7f4feb..4abd7f4feb 100644 --- a/qpid/java/perftests/src/test/java/org/apache/qpid/systest/disttest/controllerandclient/testWithTwoTests.json +++ b/qpid/java/qpid-perftests-systests/src/main/java/org/apache/qpid/systest/disttest/controllerandclient/testWithTwoTests.json diff --git a/qpid/java/perftests/src/test/java/org/apache/qpid/systest/disttest/controlleronly/DistributedControllerTest.java b/qpid/java/qpid-perftests-systests/src/main/java/org/apache/qpid/systest/disttest/controlleronly/DistributedControllerTest.java index 74c4724901..349ddb276e 100644 --- a/qpid/java/perftests/src/test/java/org/apache/qpid/systest/disttest/controlleronly/DistributedControllerTest.java +++ b/qpid/java/qpid-perftests-systests/src/main/java/org/apache/qpid/systest/disttest/controlleronly/DistributedControllerTest.java @@ -38,7 +38,7 @@ import javax.jms.MessageProducer; import javax.jms.Session; import javax.jms.TemporaryQueue; -import org.apache.qpid.disttest.ConfigFileTestHelper; +import org.apache.qpid.systest.disttest.ConfigFileTestHelper; import org.apache.qpid.disttest.controller.Controller; import org.apache.qpid.disttest.controller.config.Config; import org.apache.qpid.disttest.jms.ControllerJmsDelegate; diff --git a/qpid/java/perftests/src/test/java/org/apache/qpid/systest/disttest/controlleronly/distributedControllerTest.json b/qpid/java/qpid-perftests-systests/src/main/java/org/apache/qpid/systest/disttest/controlleronly/distributedControllerTest.json index b49603ef23..b49603ef23 100644 --- a/qpid/java/perftests/src/test/java/org/apache/qpid/systest/disttest/controlleronly/distributedControllerTest.json +++ b/qpid/java/qpid-perftests-systests/src/main/java/org/apache/qpid/systest/disttest/controlleronly/distributedControllerTest.json diff --git a/qpid/java/perftests/src/test/java/org/apache/qpid/systest/disttest/endtoend/EndToEndTest.java b/qpid/java/qpid-perftests-systests/src/main/java/org/apache/qpid/systest/disttest/endtoend/EndToEndTest.java index a0c2a4b342..010eec4982 100644 --- a/qpid/java/perftests/src/test/java/org/apache/qpid/systest/disttest/endtoend/EndToEndTest.java +++ b/qpid/java/qpid-perftests-systests/src/main/java/org/apache/qpid/systest/disttest/endtoend/EndToEndTest.java @@ -36,8 +36,8 @@ import org.apache.qpid.util.FileUtils; public class EndToEndTest extends QpidBrokerTestCase { private ControllerRunner _runner; - private static final String TEST_CONFIG = "perftests/src/test/java/org/apache/qpid/systest/disttest/endtoend/endtoend.json"; - private static final String JNDI_CONFIG_FILE = "perftests/src/test/java/org/apache/qpid/systest/disttest/perftests.systests.properties"; + private static final String TEST_CONFIG = "qpid-perftests-systests/src/main/java/org/apache/qpid/systest/disttest/endtoend/endtoend.json"; + private static final String JNDI_CONFIG_FILE = "qpid-perftests-systests/src/main/java/org/apache/qpid/systest/disttest/perftests.systests.properties"; private static final String RUN1 = "run1"; public void testRunner() throws Exception diff --git a/qpid/java/perftests/src/test/java/org/apache/qpid/systest/disttest/endtoend/endtoend.json b/qpid/java/qpid-perftests-systests/src/main/java/org/apache/qpid/systest/disttest/endtoend/endtoend.json index 1b7cc51265..1b7cc51265 100644 --- a/qpid/java/perftests/src/test/java/org/apache/qpid/systest/disttest/endtoend/endtoend.json +++ b/qpid/java/qpid-perftests-systests/src/main/java/org/apache/qpid/systest/disttest/endtoend/endtoend.json diff --git a/qpid/java/perftests/src/test/java/org/apache/qpid/systest/disttest/perftests.systests.properties b/qpid/java/qpid-perftests-systests/src/main/java/org/apache/qpid/systest/disttest/perftests.systests.properties index 149e632048..149e632048 100644 --- a/qpid/java/perftests/src/test/java/org/apache/qpid/systest/disttest/perftests.systests.properties +++ b/qpid/java/qpid-perftests-systests/src/main/java/org/apache/qpid/systest/disttest/perftests.systests.properties diff --git a/qpid/java/qpid-systests-parent/pom.xml b/qpid/java/qpid-systests-parent/pom.xml index f550aff884..eaea72cb22 100644 --- a/qpid/java/qpid-systests-parent/pom.xml +++ b/qpid/java/qpid-systests-parent/pom.xml @@ -39,6 +39,8 @@ <test.working.directory>${basedir}/..</test.working.directory> <test.resource.directory>${basedir}/..</test.resource.directory> <test.systest.resource.directory>${basedir}</test.systest.resource.directory> + <!-- Jacoco skip workaround --> + <argLine></argLine> </properties> <dependencies> @@ -70,6 +72,8 @@ </dependencies> <build> + <testSourceDirectory>src/main/java</testSourceDirectory> + <resources> <resource> <directory>src/main/resources</directory> @@ -204,7 +208,27 @@ </executions> </plugin> + + <plugin> + <groupId>org.jacoco</groupId> + <artifactId>jacoco-maven-plugin</artifactId> + <configuration> + <skip>true</skip> + </configuration> + </plugin> </plugins> </build> + <reporting> + <plugins> + <plugin> + <groupId>org.jacoco</groupId> + <artifactId>jacoco-maven-plugin</artifactId> + <configuration> + <skip>true</skip> + </configuration> + </plugin> + </plugins> + </reporting> + </project> diff --git a/qpid/java/release-docs/RELEASE_NOTES.txt b/qpid/java/release-docs/RELEASE_NOTES.txt deleted file mode 100644 index f94c45fd4d..0000000000 --- a/qpid/java/release-docs/RELEASE_NOTES.txt +++ /dev/null @@ -1,21 +0,0 @@ -Apache Qpid Java 0.8 Release Notes -------------------------------------------- - -The Qpid 0.8 release contains support for AMQP 0-8, 0-9 and 0-10. You -can access the specifications from - -http://www.amqp.org/confluence/display/AMQP/AMQP+Specification - -For full details of Apache Qpid's capabilities see our detailed -project documentation at: - -http://cwiki.apache.org/confluence/display/qpid/Qpid+Java+Documentation - -From the link above you can access our Getting Started Guide, FAQ, Build How To -and detailed developer documentation. - -Known Issues/Outstanding Work ------------------------------ - -You can view the outstanding task list for Qpid by visiting our JIRA: -http://issues.apache.org/jira/browse/QPID diff --git a/qpid/java/systests/pom.xml b/qpid/java/systests/pom.xml index 070e9f9ace..319a3da5b2 100644 --- a/qpid/java/systests/pom.xml +++ b/qpid/java/systests/pom.xml @@ -185,8 +185,4 @@ </dependencies> - <build> - <testSourceDirectory>src/main/java</testSourceDirectory> - </build> - </project> diff --git a/qpid/java/systests/src/main/java/org/apache/qpid/server/store/SlowMessageStore.java b/qpid/java/systests/src/main/java/org/apache/qpid/server/store/SlowMessageStore.java index cc3e7574b8..84d1a9cb1c 100644 --- a/qpid/java/systests/src/main/java/org/apache/qpid/server/store/SlowMessageStore.java +++ b/qpid/java/systests/src/main/java/org/apache/qpid/server/store/SlowMessageStore.java @@ -213,14 +213,6 @@ public class SlowMessageStore implements MessageStore, DurableConfigurationStore } @Override - public void update(ConfiguredObjectRecord... records) throws StoreException - { - doPreDelay("update"); - _durableConfigurationStore.update(records); - doPostDelay("update"); - } - - @Override public void update(boolean createIfNecessary, ConfiguredObjectRecord... records) throws StoreException { doPreDelay("update"); |