jmeter-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From pmoua...@apache.org
Subject svn commit: r1308201 - in /jmeter/trunk: src/core/org/apache/jmeter/engine/ClientJMeterEngine.java src/core/org/apache/jmeter/engine/RemoteJMeterEngineImpl.java xdocs/changes.xml
Date Sun, 01 Apr 2012 20:56:14 GMT
Author: pmouawad
Date: Sun Apr  1 20:56:14 2012
New Revision: 1308201

URL: http://svn.apache.org/viewvc?rev=1308201&view=rev
Log:
Bug 52967 - The function __P() couldn't use default value when running with remote server
in GUI mode. 

Modified:
    jmeter/trunk/src/core/org/apache/jmeter/engine/ClientJMeterEngine.java
    jmeter/trunk/src/core/org/apache/jmeter/engine/RemoteJMeterEngineImpl.java
    jmeter/trunk/xdocs/changes.xml

Modified: jmeter/trunk/src/core/org/apache/jmeter/engine/ClientJMeterEngine.java
URL: http://svn.apache.org/viewvc/jmeter/trunk/src/core/org/apache/jmeter/engine/ClientJMeterEngine.java?rev=1308201&r1=1308200&r2=1308201&view=diff
==============================================================================
--- jmeter/trunk/src/core/org/apache/jmeter/engine/ClientJMeterEngine.java (original)
+++ jmeter/trunk/src/core/org/apache/jmeter/engine/ClientJMeterEngine.java Sun Apr  1 20:56:14
2012
@@ -131,14 +131,15 @@ public class ClientJMeterEngine implemen
                 remote.rconfigure(testTree, host, baseDirRelative, scriptName);
             }
             log.info("sent test to " + host + " basedir='"+baseDirRelative+"'"); // $NON-NLS-1$
-            if (savep != null){
-                log.info("Sending properties "+savep);
-                try {
-                    methodName="rsetProperties()";
-                    remote.rsetProperties(savep);
-                } catch (RemoteException e) {
-                    log.warn("Could not set properties: " + e.toString());
-                }
+            if(savep == null) {
+                savep = new Properties();
+            }
+            log.info("Sending properties "+savep);
+            try {
+                methodName="rsetProperties()";
+                remote.rsetProperties(savep);
+            } catch (RemoteException e) {
+                log.warn("Could not set properties: " + e.toString());
             }
             methodName="rrunTest()";
             remote.rrunTest();

Modified: jmeter/trunk/src/core/org/apache/jmeter/engine/RemoteJMeterEngineImpl.java
URL: http://svn.apache.org/viewvc/jmeter/trunk/src/core/org/apache/jmeter/engine/RemoteJMeterEngineImpl.java?rev=1308201&r1=1308200&r2=1308201&view=diff
==============================================================================
--- jmeter/trunk/src/core/org/apache/jmeter/engine/RemoteJMeterEngineImpl.java (original)
+++ jmeter/trunk/src/core/org/apache/jmeter/engine/RemoteJMeterEngineImpl.java Sun Apr  1
20:56:14 2012
@@ -25,6 +25,7 @@ import java.rmi.NotBoundException;
 import java.rmi.RemoteException;
 import java.rmi.registry.LocateRegistry;
 import java.rmi.registry.Registry;
+import java.util.Iterator;
 import java.util.Properties;
 
 import org.apache.jmeter.services.FileServer;
@@ -66,7 +67,9 @@ public class RemoteJMeterEngineImpl exte
     private final Object LOCK = new Object();
 
     private final int rmiPort;
-    
+
+    private Properties remotelySetProperties;
+
     private RemoteJMeterEngineImpl(int localPort, int rmiPort) throws RemoteException {
         super(localPort); // Create this object using the specified port (0 means anonymous)
         this.rmiPort = rmiPort;
@@ -197,7 +200,16 @@ public class RemoteJMeterEngineImpl exte
 
     public void rsetProperties(Properties p) throws RemoteException, IllegalStateException
{
         checkOwner("setProperties");
+        if(remotelySetProperties != null) {
+            Properties jmeterProperties = JMeterUtils.getJMeterProperties();
+            log.info("Cleaning previously set properties "+remotelySetProperties);
+            for (Iterator iterator = remotelySetProperties.keySet().iterator(); iterator.hasNext();)
{
+                String key = (String) iterator.next();
+                jmeterProperties.remove(key);
+            }
+        }
         backingEngine.setProperties(p);
+        this.remotelySetProperties = p;
     }
 
     /**

Modified: jmeter/trunk/xdocs/changes.xml
URL: http://svn.apache.org/viewvc/jmeter/trunk/xdocs/changes.xml?rev=1308201&r1=1308200&r2=1308201&view=diff
==============================================================================
--- jmeter/trunk/xdocs/changes.xml (original)
+++ jmeter/trunk/xdocs/changes.xml Sun Apr  1 20:56:14 2012
@@ -140,6 +140,7 @@ Graph Full Results Listener has been rem
 <li>Bug 52645 - Recording with Proxy leads to OutOfMemory</li>
 <li>Bug 52679 - User Parameters columns narrow</li>
 <li>Bug 52843 - Sample headerSize and bodySize not being accumulated for subsamples</li>
+<li>Bug 52967 - The function __P() couldn't use default value when running with remote
server in GUI mode.</li>
 </ul>
 
 <!-- =================== Improvements =================== -->



Mime
View raw message