I have attached my JMeter test case, as well as my test JSPs. "populate.jsp" is used to populate the repository before running the test. It assumes that the "/slide/db/load_test/" folder exists and creates 100 subfolders called "user_[i]" with 10 documents each. "slide.jsp" is the page that my JMeter test case is hitting. JMeter passes the folder name as a parameter, and the test then iterates over the documents in the folder, retrieves their content, creates a new document, retrieves its content, and deletes it. The test case uses 5 concurrent threads, and each thread pauses for 800ms between requests.

Hope the attachments make it through... :)

-Mirko


On Sat, 2004-11-20 at 12:35, Oliver Zeigermann wrote:
This should not be caused by using MySQL 4 as the Slide code for both
is identical when it comes to inserting content. Additionally,
serilzability of requests is handled in the WebDAV layer, so there
really should be no deadlocks in the store except there are
programming errors (in the store implementation).

You do not use externally controlled transactions, do you? Also make
sure that there are not open connections with pending transactions
from other tools like e.g. an SQL command line tool or a visualizer or
anything.

Anyway, looking forward to your test case :)

Oliver

<?xml version="1.0" encoding="UTF-8"?>
<node>
<testelement class="org.apache.jmeter.testelement.TestPlan">
<testelement class="org.apache.jmeter.config.Arguments" 
name="TestPlan.user_defined_variables">
<property xml:space="preserve" 
propType="org.apache.jmeter.testelement.property.StringProperty" 
name="TestElement.gui_class">org.apache.jmeter.config.gui.ArgumentsPanel</property>
<property xml:space="preserve" 
propType="org.apache.jmeter.testelement.property.StringProperty" 
name="TestElement.test_class">org.apache.jmeter.config.Arguments</property>
<collection class="java.util.ArrayList" 
propType="org.apache.jmeter.testelement.property.CollectionProperty" 
name="Arguments.arguments"/>
<property xml:space="preserve" 
propType="org.apache.jmeter.testelement.property.StringProperty" 
name="TestElement.name">User Defined Variables</property>
<property xml:space="preserve" 
propType="org.apache.jmeter.testelement.property.BooleanProperty" 
name="TestElement.enabled">true</property>
</testelement>
<property xml:space="preserve" 
propType="org.apache.jmeter.testelement.property.StringProperty" 
name="TestElement.gui_class">org.apache.jmeter.control.gui.TestPlanGui</property>
<property xml:space="preserve" 
propType="org.apache.jmeter.testelement.property.BooleanProperty" 
name="TestPlan.serialize_threadgroups">false</property>
<property xml:space="preserve" 
propType="org.apache.jmeter.testelement.property.StringProperty" 
name="TestElement.test_class">org.apache.jmeter.testelement.TestPlan</property>
<property xml:space="preserve" 
propType="org.apache.jmeter.testelement.property.StringProperty" 
name="TestElement.name">Slide Test</property>
<property xml:space="preserve" 
propType="org.apache.jmeter.testelement.property.BooleanProperty" 
name="TestPlan.functional_mode">false</property>
<property xml:space="preserve" 
propType="org.apache.jmeter.testelement.property.BooleanProperty" 
name="TestElement.enabled">true</property>
<property xml:space="preserve" 
propType="org.apache.jmeter.testelement.property.StringProperty" 
name="TestPlan.comments"/>
</testelement>
<node>
<testelement class="org.apache.jmeter.threads.ThreadGroup">
<property xml:space="preserve" 
propType="org.apache.jmeter.testelement.property.LongProperty" 
name="ThreadGroup.start_time">1100738492000</property>
<property xml:space="preserve" 
propType="org.apache.jmeter.testelement.property.StringProperty" 
name="TestElement.test_class">org.apache.jmeter.threads.ThreadGroup</property>
<property xml:space="preserve" 
propType="org.apache.jmeter.testelement.property.StringProperty" 
name="ThreadGroup.delay"/>
<property xml:space="preserve" 
propType="org.apache.jmeter.testelement.property.StringProperty" 
name="ThreadGroup.duration"/>
<property xml:space="preserve" 
propType="org.apache.jmeter.testelement.property.BooleanProperty" 
name="TestElement.enabled">true</property>
<property xml:space="preserve" 
propType="org.apache.jmeter.testelement.property.StringProperty" 
name="ThreadGroup.num_threads">5</property>
<property xml:space="preserve" 
propType="org.apache.jmeter.testelement.property.BooleanProperty" 
name="ThreadGroup.scheduler">false</property>
<property xml:space="preserve" 
propType="org.apache.jmeter.testelement.property.StringProperty" 
name="TestElement.gui_class">org.apache.jmeter.threads.gui.ThreadGroupGui</property>
<testelement class="org.apache.jmeter.control.LoopController" 
name="ThreadGroup.main_controller">
<property xml:space="preserve" 
propType="org.apache.jmeter.testelement.property.StringProperty" 
name="TestElement.gui_class">org.apache.jmeter.control.gui.LoopControlPanel</property>
<property xml:space="preserve" 
propType="org.apache.jmeter.testelement.property.IntegerProperty" 
name="LoopController.loops">-1</property>
<property xml:space="preserve" 
propType="org.apache.jmeter.testelement.property.StringProperty" 
name="TestElement.test_class">org.apache.jmeter.control.LoopController</property>
<property xml:space="preserve" 
propType="org.apache.jmeter.testelement.property.StringProperty" 
name="TestElement.name">Loop Controller</property>
<property xml:space="preserve" 
propType="org.apache.jmeter.testelement.property.BooleanProperty" 
name="TestElement.enabled">true</property>
<property xml:space="preserve" 
propType="org.apache.jmeter.testelement.property.BooleanProperty" 
name="LoopController.continue_forever">false</property>
</testelement>
<property xml:space="preserve" 
propType="org.apache.jmeter.testelement.property.StringProperty" 
name="TestElement.name">Thread Group</property>
<property xml:space="preserve" 
propType="org.apache.jmeter.testelement.property.LongProperty" 
name="ThreadGroup.end_time">1100738492000</property>
<property xml:space="preserve" 
propType="org.apache.jmeter.testelement.property.StringProperty" 
name="ThreadGroup.on_sample_error">continue</property>
<property xml:space="preserve" 
propType="org.apache.jmeter.testelement.property.StringProperty" 
name="ThreadGroup.ramp_time">1</property>
</testelement>
<node>
<testelement class="org.apache.jmeter.protocol.http.sampler.HTTPSampler">
<property xml:space="preserve" 
propType="org.apache.jmeter.testelement.property.StringProperty" 
name="HTTPSampler.path">/jmeter_slide/slide.jsp</property>
<property xml:space="preserve" 
propType="org.apache.jmeter.testelement.property.StringProperty" 
name="TestElement.test_class">org.apache.jmeter.protocol.http.sampler.HTTPSampler</property>
<property xml:space="preserve" 
propType="org.apache.jmeter.testelement.property.StringProperty" 
name="HTTPSampler.method">GET</property>
<property xml:space="preserve" 
propType="org.apache.jmeter.testelement.property.BooleanProperty" 
name="HTTPSampler.use_keepalive">true</property>
<property xml:space="preserve" 
propType="org.apache.jmeter.testelement.property.StringProperty" 
name="HTTPSampler.protocol"/>
<property xml:space="preserve" 
propType="org.apache.jmeter.testelement.property.BooleanProperty" 
name="TestElement.enabled">true</property>
<property xml:space="preserve" 
propType="org.apache.jmeter.testelement.property.BooleanProperty" 
name="HTTPSampler.image_parser">false</property>
<property xml:space="preserve" 
propType="org.apache.jmeter.testelement.property.BooleanProperty" 
name="HTTPSampler.follow_redirects">true</property>
<property xml:space="preserve" 
propType="org.apache.jmeter.testelement.property.StringProperty" 
name="HTTPSampler.port">8080</property>
<testelement class="org.apache.jmeter.config.Arguments" 
name="HTTPsampler.Arguments">
<property xml:space="preserve" 
propType="org.apache.jmeter.testelement.property.StringProperty" 
name="TestElement.gui_class">org.apache.jmeter.protocol.http.gui.HTTPArgumentsPanel</property>
<property xml:space="preserve" 
propType="org.apache.jmeter.testelement.property.StringProperty" 
name="TestElement.test_class">org.apache.jmeter.config.Arguments</property>
<collection class="java.util.LinkedList" 
propType="org.apache.jmeter.testelement.property.CollectionProperty" 
name="Arguments.arguments">
<testelement class="org.apache.jmeter.protocol.http.util.HTTPArgument" name="">
<property xml:space="preserve" 
propType="org.apache.jmeter.testelement.property.StringProperty" 
name="Argument.metadata">=</property>
<property xml:space="preserve" 
propType="org.apache.jmeter.testelement.property.StringProperty" 
name="Argument.value">user_${user_counter}</property>
<property xml:space="preserve" 
propType="org.apache.jmeter.testelement.property.BooleanProperty" 
name="HTTPArgument.use_equals">true</property>
<property xml:space="preserve" 
propType="org.apache.jmeter.testelement.property.StringProperty" 
name="Argument.name">folder</property>
<property xml:space="preserve" 
propType="org.apache.jmeter.testelement.property.BooleanProperty" 
name="HTTPArgument.always_encode">false</property>
</testelement>
</collection>
<property xml:space="preserve" 
propType="org.apache.jmeter.testelement.property.StringProperty" 
name="TestElement.name">User Defined Variables</property>
<property xml:space="preserve" 
propType="org.apache.jmeter.testelement.property.BooleanProperty" 
name="TestElement.enabled">true</property>
</testelement>
<property xml:space="preserve" 
propType="org.apache.jmeter.testelement.property.StringProperty" 
name="HTTPSampler.mimetype"/>
<property xml:space="preserve" 
propType="org.apache.jmeter.testelement.property.StringProperty" 
name="TestElement.gui_class">org.apache.jmeter.protocol.http.control.gui.HttpTestSampleGui</property>
<property xml:space="preserve" 
propType="org.apache.jmeter.testelement.property.StringProperty" 
name="HTTPSampler.FILE_FIELD"/>
<property xml:space="preserve" 
propType="org.apache.jmeter.testelement.property.StringProperty" 
name="TestElement.name">HTTP Request</property>
<property xml:space="preserve" 
propType="org.apache.jmeter.testelement.property.StringProperty" 
name="HTTPSampler.monitor">false</property>
<property xml:space="preserve" 
propType="org.apache.jmeter.testelement.property.StringProperty" 
name="HTTPSampler.domain">localhost</property>
<property xml:space="preserve" 
propType="org.apache.jmeter.testelement.property.StringProperty" 
name="HTTPSampler.FILE_NAME"/>
<property xml:space="preserve" 
propType="org.apache.jmeter.testelement.property.BooleanProperty" 
name="HTTPSampler.auto_redirects">false</property>
</testelement>
<node>
<testelement class="org.apache.jmeter.assertions.ResponseAssertion">
<property xml:space="preserve" 
propType="org.apache.jmeter.testelement.property.StringProperty" 
name="TestElement.gui_class">org.apache.jmeter.assertions.gui.AssertionGui</property>
<property xml:space="preserve" 
propType="org.apache.jmeter.testelement.property.StringProperty" 
name="TestElement.test_class">org.apache.jmeter.assertions.ResponseAssertion</property>
<property xml:space="preserve" 
propType="org.apache.jmeter.testelement.property.StringProperty" 
name="TestElement.name">Response Assertion</property>
<collection class="java.util.ArrayList" 
propType="org.apache.jmeter.testelement.property.CollectionProperty" 
name="Asserion.test_strings">
<property xml:space="preserve" 
propType="org.apache.jmeter.testelement.property.StringProperty" 
name="SUCCESS">SUCCESS</property>
</collection>
<property xml:space="preserve" 
propType="org.apache.jmeter.testelement.property.BooleanProperty" 
name="TestElement.enabled">true</property>
<property xml:space="preserve" 
propType="org.apache.jmeter.testelement.property.StringProperty" 
name="Assertion.test_field">Assertion.response_data</property>
<property xml:space="preserve" 
propType="org.apache.jmeter.testelement.property.IntegerProperty" 
name="Assertion.test_type">2</property>
</testelement>
</node>
<node>
<testelement class="org.apache.jmeter.modifiers.CounterConfig">
<property xml:space="preserve" 
propType="org.apache.jmeter.testelement.property.StringProperty" 
name="TestElement.gui_class">org.apache.jmeter.modifiers.gui.CounterConfigGui</property>
<property xml:space="preserve" 
propType="org.apache.jmeter.testelement.property.StringProperty" 
name="CounterConfig.start">0</property>
<property xml:space="preserve" 
propType="org.apache.jmeter.testelement.property.StringProperty" 
name="CounterConfig.incr">1</property>
<property xml:space="preserve" 
propType="org.apache.jmeter.testelement.property.StringProperty" 
name="TestElement.test_class">org.apache.jmeter.modifiers.CounterConfig</property>
<property xml:space="preserve" 
propType="org.apache.jmeter.testelement.property.StringProperty" 
name="CounterConfig.name">user_counter</property>
<property xml:space="preserve" 
propType="org.apache.jmeter.testelement.property.StringProperty" 
name="TestElement.name">User Counter</property>
<property xml:space="preserve" 
propType="org.apache.jmeter.testelement.property.BooleanProperty" 
name="CounterConfig.per_user">false</property>
<property xml:space="preserve" 
propType="org.apache.jmeter.testelement.property.BooleanProperty" 
name="TestElement.enabled">true</property>
<property xml:space="preserve" 
propType="org.apache.jmeter.testelement.property.StringProperty" 
name="CounterConfig.end">99</property>
</testelement>
</node>
</node>
<node>
<testelement class="org.apache.jmeter.timers.ConstantTimer">
<property xml:space="preserve" 
propType="org.apache.jmeter.testelement.property.StringProperty" 
name="TestElement.gui_class">org.apache.jmeter.timers.gui.ConstantTimerGui</property>
<property xml:space="preserve" 
propType="org.apache.jmeter.testelement.property.StringProperty" 
name="TestElement.test_class">org.apache.jmeter.timers.ConstantTimer</property>
<property xml:space="preserve" 
propType="org.apache.jmeter.testelement.property.StringProperty" 
name="TestElement.name">Constant Timer</property>
<property xml:space="preserve" 
propType="org.apache.jmeter.testelement.property.BooleanProperty" 
name="TestElement.enabled">true</property>
<property xml:space="preserve" 
propType="org.apache.jmeter.testelement.property.StringProperty" 
name="ConstantTimer.delay">800</property>
</testelement>
</node>
<node>
<testelement class="org.apache.jmeter.reporters.ResultCollector">
<property xml:space="preserve" 
propType="org.apache.jmeter.testelement.property.StringProperty" 
name="TestElement.gui_class">org.apache.jmeter.visualizers.GraphVisualizer</property>
<property xml:space="preserve" 
propType="org.apache.jmeter.testelement.property.StringProperty" 
name="TestElement.test_class">org.apache.jmeter.reporters.ResultCollector</property>
<property xml:space="preserve" 
propType="org.apache.jmeter.testelement.property.StringProperty" 
name="TestElement.name">Graph Results</property>
<property xml:space="preserve" 
propType="org.apache.jmeter.testelement.property.BooleanProperty" 
name="TestElement.enabled">true</property>
<property xml:space="preserve" 
propType="org.apache.jmeter.testelement.property.StringProperty" 
name="filename"/>
<property xml:space="preserve" 
propType="org.apache.jmeter.testelement.property.BooleanProperty" 
name="ResultCollector.error_logging">false</property>
</testelement>
</node>
<node>
<testelement class="org.apache.jmeter.reporters.ResultCollector">
<property xml:space="preserve" 
propType="org.apache.jmeter.testelement.property.StringProperty" 
name="TestElement.gui_class">org.apache.jmeter.visualizers.AssertionVisualizer</property>
<property xml:space="preserve" 
propType="org.apache.jmeter.testelement.property.StringProperty" 
name="TestElement.test_class">org.apache.jmeter.reporters.ResultCollector</property>
<property xml:space="preserve" 
propType="org.apache.jmeter.testelement.property.StringProperty" 
name="TestElement.name">Assertion Results</property>
<property xml:space="preserve" 
propType="org.apache.jmeter.testelement.property.BooleanProperty" 
name="TestElement.enabled">true</property>
<property xml:space="preserve" 
propType="org.apache.jmeter.testelement.property.StringProperty" 
name="filename"/>
<property xml:space="preserve" 
propType="org.apache.jmeter.testelement.property.BooleanProperty" 
name="ResultCollector.error_logging">false</property>
</testelement>
</node>
<node>
<testelement class="org.apache.jmeter.reporters.ResultCollector">
<property xml:space="preserve" 
propType="org.apache.jmeter.testelement.property.StringProperty" 
name="TestElement.gui_class">org.apache.jmeter.visualizers.StatVisualizer</property>
<property xml:space="preserve" 
propType="org.apache.jmeter.testelement.property.StringProperty" 
name="TestElement.test_class">org.apache.jmeter.reporters.ResultCollector</property>
<property xml:space="preserve" 
propType="org.apache.jmeter.testelement.property.StringProperty" 
name="TestElement.name">Aggregate Report</property>
<property xml:space="preserve" 
propType="org.apache.jmeter.testelement.property.BooleanProperty" 
name="TestElement.enabled">true</property>
<property xml:space="preserve" 
propType="org.apache.jmeter.testelement.property.StringProperty" 
name="filename"/>
<property xml:space="preserve" 
propType="org.apache.jmeter.testelement.property.BooleanProperty" 
name="ResultCollector.error_logging">false</property>
</testelement>
</node>
</node>
</node>
<[EMAIL PROTECTED] import="java.io.*,
               java.util.*,
                           org.apache.commons.httpclient.*,
                           org.apache.webdav.lib.*,
                           org.apache.webdav.lib.methods.*,
                           org.apache.webdav.lib.properties.*,
                           org.w3c.dom.Document"%>

<%
        String baseURL = "http://localhost:8080";;
        String loadTestPath = "/slide/db/load_test/";
        
        HttpURL url = new HttpURL(baseURL + loadTestPath);
        
        try {
                boolean success = true;
                WebdavResource folder = new WebdavResource(url);

                // delete and recreate load_test folder         
                folder.deleteMethod();
                folder.mkcolMethod();
                
                // create 100 subfolders
                for (int i = 0; i < 100; i++) {
                        String subfolderPath = loadTestPath + "user_" + i;
                        folder.mkcolMethod(subfolderPath);
                        
                        // populate subfolder with docs
                        for (int j = 0; j < 10; j++) {
                                folder.putMethod(subfolderPath + "/foobar_" + j 
+ ".txt", new File("/home/mfroehlich/testdata/foobar.txt"));
                        }
                }
                
        } catch (HttpException e) {
                // TODO Auto-generated catch block
                e.printStackTrace(new java.io.PrintWriter(out));
        } catch (IOException e) {
                // TODO Auto-generated catch block
                e.printStackTrace(new java.io.PrintWriter(out));
        }
%>
<[EMAIL PROTECTED] import="java.io.*,
               java.util.*,
                           org.apache.commons.httpclient.*,
                           org.apache.webdav.lib.*,
                           org.apache.webdav.lib.methods.*,
                           org.apache.webdav.lib.properties.*,
                           org.w3c.dom.Document"%>

<%
        String baseURL = "http://localhost:8080";;
        String loadTestPath = "/slide/db/load_test/";
        
        // get user folder name from request
        String folderName = request.getParameter("folder");

        String folderPath = loadTestPath + folderName + "/";
        HttpURL url = new HttpURL(baseURL + folderPath);
        
        try {
                boolean success = true;
                WebdavResource folder = new WebdavResource(url);
                //out.println("- got folder: " + folder.getName());
                
                // iterate over documents
                WebdavResource[] docs = folder.listWebdavResources();
                if (docs.length >= 10) {
                        for (int i = 0; i < docs.length; i++) {
                                //out.println("--- got document: " + 
docs[i].getName());
                                if (docs[i].getName().startsWith("foobar_")) { 
// need this "if" to ignore transient dummy docs
                                        // get content
                                        if 
(!docs[i].getMethodDataAsString().startsWith("Here's some test data")) {
                                                success = false;
                                                break;
                                        }
                                }
                        }
                } else {
                        success = false;
                }
                
                // create new document
                String docName = "dummy_" + System.currentTimeMillis();
                String docPath = folderPath + docName;
                if (!folder.putMethod(docPath, "Dummy document")) {
                        success = false;
                        out.println("error: " + folder.getStatusMessage());
                } else {
                        // successfully created document; now retrieve it
                        if 
(!folder.getMethodDataAsString(docPath).startsWith("Dummy document")) {
                                success = false;
                        }
                        
                        // delete document
                        if (!folder.deleteMethod(docPath)) {
                                success = false;
                        }
                }
                
                if (success) {
                        out.println("SUCCESS");
                } else {
                        out.println("ERROR");
                }
        } catch (HttpException e) {
                // TODO Auto-generated catch block
                e.printStackTrace(new java.io.PrintWriter(out));
        } catch (IOException e) {
                // TODO Auto-generated catch block
                e.printStackTrace(new java.io.PrintWriter(out));
        }
%>

---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to