Author: rajdavies Date: Wed Sep 10 05:59:04 2008 New Revision: 693825 URL: http://svn.apache.org/viewvc?rev=693825&view=rev Log: Added a standard performance test case for the ActiveMQ Store implementation Added: activemq/sandbox/kahadb/src/test/eclipse-resources/ activemq/sandbox/kahadb/src/test/eclipse-resources/log4j.properties activemq/sandbox/kahadb/src/test/java/org/apache/kahadb/store/KahaStoreDurableTopicTest.java (with props) Added: activemq/sandbox/kahadb/src/test/eclipse-resources/log4j.properties URL: http://svn.apache.org/viewvc/activemq/sandbox/kahadb/src/test/eclipse-resources/log4j.properties?rev=693825&view=auto ============================================================================== --- activemq/sandbox/kahadb/src/test/eclipse-resources/log4j.properties (added) +++ activemq/sandbox/kahadb/src/test/eclipse-resources/log4j.properties Wed Sep 10 05:59:04 2008 @@ -0,0 +1,36 @@ +## ------------------------------------------------------------------------ +## 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. +## ------------------------------------------------------------------------ + +# +# The logging properties used for eclipse testing, We want to see debug output on the console. +# +log4j.rootLogger=INFO, out + + + +# CONSOLE appender not used by default +log4j.appender.out=org.apache.log4j.ConsoleAppender +log4j.appender.out.layout=org.apache.log4j.PatternLayout +log4j.appender.out.layout.ConversionPattern=[%30.30t] %-30.30c{1} %-5p %m%n +#log4j.appender.out.layout.ConversionPattern=%d [%-15.15t] %-5p %-30.30c{1} - %m%n + +# File appender +log4j.appender.fout=org.apache.log4j.FileAppender +log4j.appender.fout.layout=org.apache.log4j.PatternLayout +log4j.appender.fout.layout.ConversionPattern=%d [%-15.15t] %-5p %-30.30c{1} - %m%n +log4j.appender.fout.file=target/amq-testlog.log +log4j.appender.fout.append=true \ No newline at end of file Added: activemq/sandbox/kahadb/src/test/java/org/apache/kahadb/store/KahaStoreDurableTopicTest.java URL: http://svn.apache.org/viewvc/activemq/sandbox/kahadb/src/test/java/org/apache/kahadb/store/KahaStoreDurableTopicTest.java?rev=693825&view=auto ============================================================================== --- activemq/sandbox/kahadb/src/test/java/org/apache/kahadb/store/KahaStoreDurableTopicTest.java (added) +++ activemq/sandbox/kahadb/src/test/java/org/apache/kahadb/store/KahaStoreDurableTopicTest.java Wed Sep 10 05:59:04 2008 @@ -0,0 +1,41 @@ +/** + * 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.kahadb.store; + +import java.io.File; +import org.apache.activemq.broker.BrokerService; +import org.apache.activemq.perf.SimpleDurableTopicTest; + +/** + * @version $Revision: 1.3 $ + */ +public class KahaStoreDurableTopicTest extends SimpleDurableTopicTest { + + protected void configureBroker(BrokerService answer,String uri) throws Exception { + File dataFileDir = new File("target/test-amq-data/perfTest/amqdb"); + dataFileDir.mkdirs(); + answer.setDeleteAllMessagesOnStartup(true); + + KahaDBPersistenceAdaptor adaptor = new KahaDBPersistenceAdaptor(); + adaptor.setDirectory(dataFileDir); + + + answer.setDataDirectoryFile(dataFileDir); + answer.setPersistenceAdapter(adaptor); + answer.addConnector(uri); + } +} Propchange: activemq/sandbox/kahadb/src/test/java/org/apache/kahadb/store/KahaStoreDurableTopicTest.java ------------------------------------------------------------------------------ svn:eol-style = native