jmeter-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From s...@apache.org
Subject svn commit: r1293052 - in /jmeter/trunk: src/components/org/apache/jmeter/config/CSVDataSet.java src/core/org/apache/jmeter/engine/util/NoConfigMerge.java src/core/org/apache/jmeter/threads/TestCompiler.java xdocs/changes.xml
Date Fri, 24 Feb 2012 01:11:14 GMT
Author: sebb
Date: Fri Feb 24 01:11:14 2012
New Revision: 1293052

URL: http://svn.apache.org/viewvc?rev=1293052&view=rev
Log:
Bug 52728 - CSV Data Set Config element cannot coexist with BSF Sampler in same Thread Plan

Added:
    jmeter/trunk/src/core/org/apache/jmeter/engine/util/NoConfigMerge.java   (with props)
Modified:
    jmeter/trunk/src/components/org/apache/jmeter/config/CSVDataSet.java
    jmeter/trunk/src/core/org/apache/jmeter/threads/TestCompiler.java
    jmeter/trunk/xdocs/changes.xml

Modified: jmeter/trunk/src/components/org/apache/jmeter/config/CSVDataSet.java
URL: http://svn.apache.org/viewvc/jmeter/trunk/src/components/org/apache/jmeter/config/CSVDataSet.java?rev=1293052&r1=1293051&r2=1293052&view=diff
==============================================================================
--- jmeter/trunk/src/components/org/apache/jmeter/config/CSVDataSet.java (original)
+++ jmeter/trunk/src/components/org/apache/jmeter/config/CSVDataSet.java Fri Feb 24 01:11:14
2012
@@ -23,6 +23,7 @@ import java.util.List;
 
 import org.apache.jmeter.engine.event.LoopIterationEvent;
 import org.apache.jmeter.engine.event.LoopIterationListener;
+import org.apache.jmeter.engine.util.NoConfigMerge;
 import org.apache.jmeter.save.CSVSaveService;
 import org.apache.jmeter.services.FileServer;
 import org.apache.jmeter.testbeans.TestBean;
@@ -59,7 +60,8 @@ import org.apache.log.Logger;
  * threads with the same suffix.
  *
  */
-public class CSVDataSet extends ConfigTestElement implements TestBean, LoopIterationListener
{
+public class CSVDataSet extends ConfigTestElement 
+    implements TestBean, LoopIterationListener, NoConfigMerge {
     private static final Logger log = LoggingManager.getLoggerForClass();
 
     private static final long serialVersionUID = 232L;

Added: jmeter/trunk/src/core/org/apache/jmeter/engine/util/NoConfigMerge.java
URL: http://svn.apache.org/viewvc/jmeter/trunk/src/core/org/apache/jmeter/engine/util/NoConfigMerge.java?rev=1293052&view=auto
==============================================================================
--- jmeter/trunk/src/core/org/apache/jmeter/engine/util/NoConfigMerge.java (added)
+++ jmeter/trunk/src/core/org/apache/jmeter/engine/util/NoConfigMerge.java Fri Feb 24 01:11:14
2012
@@ -0,0 +1,35 @@
+/*
+ * 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.
+ * 
+ */
+
+/*
+ * Created on Apr 23, 2003
+ */
+package org.apache.jmeter.engine.util;
+
+import org.apache.jmeter.threads.TestCompiler;
+import org.apache.jmeter.samplers.Sampler;
+
+/**
+ * Implement this method-less interface to indicate that this ConfigElement should not be
merged. 
+ * Otherwise, the default behavior is to merge the element with every sampler in scope.
+ * 
+ * @see TestCompiler#configureSampler(Sampler)
+ * @version $Revision$
+ */
+public interface NoConfigMerge {
+}

Propchange: jmeter/trunk/src/core/org/apache/jmeter/engine/util/NoConfigMerge.java
------------------------------------------------------------------------------
    svn:eol-style = native

Propchange: jmeter/trunk/src/core/org/apache/jmeter/engine/util/NoConfigMerge.java
------------------------------------------------------------------------------
    svn:keywords = Author Date Id Revision

Modified: jmeter/trunk/src/core/org/apache/jmeter/threads/TestCompiler.java
URL: http://svn.apache.org/viewvc/jmeter/trunk/src/core/org/apache/jmeter/threads/TestCompiler.java?rev=1293052&r1=1293051&r2=1293052&view=diff
==============================================================================
--- jmeter/trunk/src/core/org/apache/jmeter/threads/TestCompiler.java (original)
+++ jmeter/trunk/src/core/org/apache/jmeter/threads/TestCompiler.java Fri Feb 24 01:11:14
2012
@@ -32,6 +32,7 @@ import org.apache.jmeter.control.Control
 import org.apache.jmeter.control.TransactionController;
 import org.apache.jmeter.control.TransactionSampler;
 import org.apache.jmeter.engine.event.LoopIterationListener;
+import org.apache.jmeter.engine.util.NoConfigMerge;
 import org.apache.jmeter.processor.PostProcessor;
 import org.apache.jmeter.processor.PreProcessor;
 import org.apache.jmeter.samplers.SampleListener;
@@ -285,7 +286,11 @@ public class TestCompiler implements Has
     private void configureWithConfigElements(Sampler sam, List<ConfigTestElement> configs)
{
         sam.clearTestElementChildren();
         for (ConfigTestElement config  : configs) {
-            sam.addTestElement(config);
+            if (!(config instanceof NoConfigMerge)) 
+            {
+                sam.addTestElement(config);
+                System.out.println(config.getName()+" "+config.getPropertyAsString(TestElement.GUI_CLASS));
+            }
         }
     }
 }

Modified: jmeter/trunk/xdocs/changes.xml
URL: http://svn.apache.org/viewvc/jmeter/trunk/xdocs/changes.xml?rev=1293052&r1=1293051&r2=1293052&view=diff
==============================================================================
--- jmeter/trunk/xdocs/changes.xml (original)
+++ jmeter/trunk/xdocs/changes.xml Fri Feb 24 01:11:14 2012
@@ -106,6 +106,7 @@ When doing replacement of User Defined V
 <li>Bug 52672 - Change Controller action deletes all but one child samplers</li>
 <li>Bug 52694 - Deadlock in GUI related to non AWT Threads updating GUI</li>
 <li>Bug 52678 - Proxy : When doing replacement of UserDefinedVariables, partial values
should not be substituted</li>
+<li>Bug 52728 - CSV Data Set Config element cannot coexist with BSF Sampler in same
Thread Plan</li>
 </ul>
 
 <!-- =================== Improvements =================== -->



Mime
View raw message