DO NOT REPLY [Bug 48747] New: TCP Sampler swallows exception samples

2010-02-16 Thread bugzilla
https://issues.apache.org/bugzilla/show_bug.cgi?id=48747

   Summary: TCP Sampler swallows exception samples
   Product: JMeter
   Version: 2.3.4
  Platform: PC
OS/Version: Windows XP
Status: NEW
  Severity: normal
  Priority: P2
 Component: Main
AssignedTo: jmeter-dev@jakarta.apache.org
ReportedBy: a...@fininfor.ru


When exception occurs during sample in TCP sampler, such samples won't appear
in results and will be hidden. This may affect test consistency.

Eg if we use BinaryTCPClientImpl class and passing uneven hex data (000), an
exception will be thrown by BinaryTCPClientImpl but not caught by TCPSampler.

I suggest to add handling such exceptions by TCPSampler, keep logging and
generate failed sample.

-- 
Configure bugmail: https://issues.apache.org/bugzilla/userprefs.cgi?tab=email
--- You are receiving this mail because: ---
You are the assignee for the bug.

-
To unsubscribe, e-mail: jmeter-dev-unsubscr...@jakarta.apache.org
For additional commands, e-mail: jmeter-dev-h...@jakarta.apache.org



DO NOT REPLY [Bug 48747] TCP Sampler swallows exception samples

2010-02-16 Thread bugzilla
https://issues.apache.org/bugzilla/show_bug.cgi?id=48747

--- Comment #1 from Andrey Pohilko a...@fininfor.ru 2010-02-16 08:17:25 UTC 
---
Created an attachment (id=24994)
 -- (https://issues.apache.org/bugzilla/attachment.cgi?id=24994)
Here's proposed changes to source code to fix the issue

By the way I want to check if diff file format is correct and I may send larger
patches in this format.

-- 
Configure bugmail: https://issues.apache.org/bugzilla/userprefs.cgi?tab=email
--- You are receiving this mail because: ---
You are the assignee for the bug.

-
To unsubscribe, e-mail: jmeter-dev-unsubscr...@jakarta.apache.org
For additional commands, e-mail: jmeter-dev-h...@jakarta.apache.org



DO NOT REPLY [Bug 48749] New: Allowing custom Thread Groups

2010-02-16 Thread bugzilla
https://issues.apache.org/bugzilla/show_bug.cgi?id=48749

   Summary: Allowing custom Thread Groups
   Product: JMeter
   Version: unspecified
  Platform: PC
OS/Version: Windows XP
Status: NEW
  Severity: enhancement
  Priority: P2
 Component: Main
AssignedTo: jmeter-dev@jakarta.apache.org
ReportedBy: a...@fininfor.ru


One unable to write custom plugin for Thread Groups to have advanced thread
start/stop scheduling. Attached patch adds such ability to JMeter.

Responsibility for threads scheduling moved from StandardJMeterEngine to
implementations of AbstractThreadGroup.

-- 
Configure bugmail: https://issues.apache.org/bugzilla/userprefs.cgi?tab=email
--- You are receiving this mail because: ---
You are the assignee for the bug.

-
To unsubscribe, e-mail: jmeter-dev-unsubscr...@jakarta.apache.org
For additional commands, e-mail: jmeter-dev-h...@jakarta.apache.org



DO NOT REPLY [Bug 48749] Allowing custom Thread Groups

2010-02-16 Thread bugzilla
https://issues.apache.org/bugzilla/show_bug.cgi?id=48749

--- Comment #1 from Andrey Pohilko a...@fininfor.ru 2010-02-16 09:45:58 UTC 
---
Created an attachment (id=24996)
 -- (https://issues.apache.org/bugzilla/attachment.cgi?id=24996)
Changes to source files

-- 
Configure bugmail: https://issues.apache.org/bugzilla/userprefs.cgi?tab=email
--- You are receiving this mail because: ---
You are the assignee for the bug.

-
To unsubscribe, e-mail: jmeter-dev-unsubscr...@jakarta.apache.org
For additional commands, e-mail: jmeter-dev-h...@jakarta.apache.org



DO NOT REPLY [Bug 48749] Allowing custom Thread Groups

2010-02-16 Thread bugzilla
https://issues.apache.org/bugzilla/show_bug.cgi?id=48749

--- Comment #2 from Andrey Pohilko a...@fininfor.ru 2010-02-16 09:46:36 UTC 
---
Created an attachment (id=24997)
 -- (https://issues.apache.org/bugzilla/attachment.cgi?id=24997)
new abstract ThreadGroup

-- 
Configure bugmail: https://issues.apache.org/bugzilla/userprefs.cgi?tab=email
--- You are receiving this mail because: ---
You are the assignee for the bug.

-
To unsubscribe, e-mail: jmeter-dev-unsubscr...@jakarta.apache.org
For additional commands, e-mail: jmeter-dev-h...@jakarta.apache.org



DO NOT REPLY [Bug 48749] Allowing custom Thread Groups

2010-02-16 Thread bugzilla
https://issues.apache.org/bugzilla/show_bug.cgi?id=48749

--- Comment #3 from Andrey Pohilko a...@fininfor.ru 2010-02-16 09:46:58 UTC 
---
Created an attachment (id=24998)
 -- (https://issues.apache.org/bugzilla/attachment.cgi?id=24998)
new abstract ThreadGroupGui

-- 
Configure bugmail: https://issues.apache.org/bugzilla/userprefs.cgi?tab=email
--- You are receiving this mail because: ---
You are the assignee for the bug.

-
To unsubscribe, e-mail: jmeter-dev-unsubscr...@jakarta.apache.org
For additional commands, e-mail: jmeter-dev-h...@jakarta.apache.org



DO NOT REPLY [Bug 48749] Allowing custom Thread Groups

2010-02-16 Thread bugzilla
https://issues.apache.org/bugzilla/show_bug.cgi?id=48749

--- Comment #4 from Andrey Pohilko a...@fininfor.ru 2010-02-16 10:06:19 UTC 
---
There's issue with icons after this patch, JMeter seems to fail finding icon
for thread groups... I failed to find a fix for this issue.

-- 
Configure bugmail: https://issues.apache.org/bugzilla/userprefs.cgi?tab=email
--- You are receiving this mail because: ---
You are the assignee for the bug.

-
To unsubscribe, e-mail: jmeter-dev-unsubscr...@jakarta.apache.org
For additional commands, e-mail: jmeter-dev-h...@jakarta.apache.org



DO NOT REPLY [Bug 48749] Allowing custom Thread Groups

2010-02-16 Thread bugzilla
https://issues.apache.org/bugzilla/show_bug.cgi?id=48749

--- Comment #5 from Andrey Pohilko a...@fininfor.ru 2010-02-16 10:22:19 UTC 
---
Maybe it could be better also move total threads number GUI from ThreadGroupGui
to AbstractThreadGroupGui because it's common property as on error buttons

-- 
Configure bugmail: https://issues.apache.org/bugzilla/userprefs.cgi?tab=email
--- You are receiving this mail because: ---
You are the assignee for the bug.

-
To unsubscribe, e-mail: jmeter-dev-unsubscr...@jakarta.apache.org
For additional commands, e-mail: jmeter-dev-h...@jakarta.apache.org



DO NOT REPLY [Bug 48749] Allowing custom Thread Groups

2010-02-16 Thread bugzilla
https://issues.apache.org/bugzilla/show_bug.cgi?id=48749

Andrey Pohilko a...@fininfor.ru changed:

   What|Removed |Added

  Attachment #24996|0   |1
is obsolete||

--- Comment #6 from Andrey Pohilko a...@fininfor.ru 2010-02-16 10:26:22 UTC 
---
Created an attachment (id=24999)
 -- (https://issues.apache.org/bugzilla/attachment.cgi?id=24999)
Proposed source code changes

-- 
Configure bugmail: https://issues.apache.org/bugzilla/userprefs.cgi?tab=email
--- You are receiving this mail because: ---
You are the assignee for the bug.

-
To unsubscribe, e-mail: jmeter-dev-unsubscr...@jakarta.apache.org
For additional commands, e-mail: jmeter-dev-h...@jakarta.apache.org



DO NOT REPLY [Bug 48749] Allowing custom Thread Groups

2010-02-16 Thread bugzilla
https://issues.apache.org/bugzilla/show_bug.cgi?id=48749

Andrey Pohilko a...@fininfor.ru changed:

   What|Removed |Added

  Attachment #24999|0   |1
is obsolete||

--- Comment #7 from Andrey Pohilko a...@fininfor.ru 2010-02-16 10:37:59 UTC 
---
Created an attachment (id=25000)
 -- (https://issues.apache.org/bugzilla/attachment.cgi?id=25000)
Proposed source code changes

Issue with icons solved

-- 
Configure bugmail: https://issues.apache.org/bugzilla/userprefs.cgi?tab=email
--- You are receiving this mail because: ---
You are the assignee for the bug.

-
To unsubscribe, e-mail: jmeter-dev-unsubscr...@jakarta.apache.org
For additional commands, e-mail: jmeter-dev-h...@jakarta.apache.org



svn commit: r910559 - in /jakarta/jmeter/trunk: src/protocol/tcp/org/apache/jmeter/protocol/tcp/sampler/TCPSampler.java xdocs/changes.xml

2010-02-16 Thread sebb
Author: sebb
Date: Tue Feb 16 15:21:18 2010
New Revision: 910559

URL: http://svn.apache.org/viewvc?rev=910559view=rev
Log:
Bug 48747 - TCP Sampler swallows exceptions

Modified:

jakarta/jmeter/trunk/src/protocol/tcp/org/apache/jmeter/protocol/tcp/sampler/TCPSampler.java
jakarta/jmeter/trunk/xdocs/changes.xml

Modified: 
jakarta/jmeter/trunk/src/protocol/tcp/org/apache/jmeter/protocol/tcp/sampler/TCPSampler.java
URL: 
http://svn.apache.org/viewvc/jakarta/jmeter/trunk/src/protocol/tcp/org/apache/jmeter/protocol/tcp/sampler/TCPSampler.java?rev=910559r1=910558r2=910559view=diff
==
--- 
jakarta/jmeter/trunk/src/protocol/tcp/org/apache/jmeter/protocol/tcp/sampler/TCPSampler.java
 (original)
+++ 
jakarta/jmeter/trunk/src/protocol/tcp/org/apache/jmeter/protocol/tcp/sampler/TCPSampler.java
 Tue Feb 16 15:21:18 2010
@@ -337,6 +337,11 @@
 res.setResponseCode(500); //$NON-NLS-1$
 res.setResponseMessage(ex.toString());
 closeSocket();
+} catch (Exception ex) {
+log.error(, ex);
+isSuccessful=false;
+res.setResponseCode(500);
+res.setResponseMessage(ex.toString());
 } finally {
 // Calculate response time
 res.sampleEnd();

Modified: jakarta/jmeter/trunk/xdocs/changes.xml
URL: 
http://svn.apache.org/viewvc/jakarta/jmeter/trunk/xdocs/changes.xml?rev=910559r1=910558r2=910559view=diff
==
--- jakarta/jmeter/trunk/xdocs/changes.xml (original)
+++ jakarta/jmeter/trunk/xdocs/changes.xml Tue Feb 16 15:21:18 2010
@@ -96,6 +96,7 @@
 liBug 47992 - JMS Point-to-Point Request - Response option doesn't work/li
 liBug 48573 - LDAPExtSampler directory context handling/li
 liBug 48579 - Single Bind does not show config information when LdapExt 
Sampler is accessed/li
+liBug 48747 - TCP Sampler swallows exceptions/li
 /ul
 
 h3Controllers/h3



-
To unsubscribe, e-mail: jmeter-dev-unsubscr...@jakarta.apache.org
For additional commands, e-mail: jmeter-dev-h...@jakarta.apache.org



DO NOT REPLY [Bug 48747] TCP Sampler swallows exception samples

2010-02-16 Thread bugzilla
https://issues.apache.org/bugzilla/show_bug.cgi?id=48747

Sebb s...@apache.org changed:

   What|Removed |Added

 Status|NEW |RESOLVED
 Resolution||FIXED

--- Comment #2 from Sebb s...@apache.org 2010-02-16 15:22:23 UTC ---
Thanks, that patch applied perfectly:

URL: http://svn.apache.org/viewvc?rev=910559view=rev
Log:
Bug 48747 - TCP Sampler swallows exceptions

Modified:
  
jakarta/jmeter/trunk/src/protocol/tcp/org/apache/jmeter/protocol/tcp/sampler/TCPSampler.java
   jakarta/jmeter/trunk/xdocs/changes.xml

-- 
Configure bugmail: https://issues.apache.org/bugzilla/userprefs.cgi?tab=email
--- You are receiving this mail because: ---
You are the assignee for the bug.

-
To unsubscribe, e-mail: jmeter-dev-unsubscr...@jakarta.apache.org
For additional commands, e-mail: jmeter-dev-h...@jakarta.apache.org



DO NOT REPLY [Bug 48753] New: CookieManager is not available when run with jdk 1.6.0_13

2010-02-16 Thread bugzilla
https://issues.apache.org/bugzilla/show_bug.cgi?id=48753

   Summary: CookieManager is not available when run with jdk
1.6.0_13
   Product: JMeter
   Version: 2.3.4
  Platform: PC
OS/Version: Linux
Status: NEW
  Severity: normal
  Priority: P2
 Component: HTTP
AssignedTo: jmeter-dev@jakarta.apache.org
ReportedBy: h...@synyx.de


The Option for adding an HttpCookieManager is not available when run under
Kubuntu with jdk 1.6.0_13. No indication of a failure in the logs, it's just
not there. Running a normal test works.

When running with jdk  1.5.0_13 the option is there and can be used normally.

-- 
Configure bugmail: https://issues.apache.org/bugzilla/userprefs.cgi?tab=email
--- You are receiving this mail because: ---
You are the assignee for the bug.

-
To unsubscribe, e-mail: jmeter-dev-unsubscr...@jakarta.apache.org
For additional commands, e-mail: jmeter-dev-h...@jakarta.apache.org



DO NOT REPLY [Bug 48714] add new French messages

2010-02-16 Thread bugzilla
https://issues.apache.org/bugzilla/show_bug.cgi?id=48714

--- Comment #4 from Milamber milambersp...@gmail.com 2010-02-16 23:08:58 UTC 
---
Created an attachment (id=25002)
 -- (https://issues.apache.org/bugzilla/attachment.cgi?id=25002)
Missing file for JSR223 Sampler fr messages

Confused, one missing file for JSR223 Sampler fr messages

-- 
Configure bugmail: https://issues.apache.org/bugzilla/userprefs.cgi?tab=email
--- You are receiving this mail because: ---
You are the assignee for the bug.

-
To unsubscribe, e-mail: jmeter-dev-unsubscr...@jakarta.apache.org
For additional commands, e-mail: jmeter-dev-h...@jakarta.apache.org



svn commit: r910765 - /jakarta/jmeter/trunk/src/protocol/java/org/apache/jmeter/protocol/java/sampler/JSR223SamplerResources_fr.properties

2010-02-16 Thread sebb
Author: sebb
Date: Tue Feb 16 23:28:02 2010
New Revision: 910765

URL: http://svn.apache.org/viewvc?rev=910765view=rev
Log:
Bug 48714 - add new French messages

Added:

jakarta/jmeter/trunk/src/protocol/java/org/apache/jmeter/protocol/java/sampler/JSR223SamplerResources_fr.properties
   (with props)

Added: 
jakarta/jmeter/trunk/src/protocol/java/org/apache/jmeter/protocol/java/sampler/JSR223SamplerResources_fr.properties
URL: 
http://svn.apache.org/viewvc/jakarta/jmeter/trunk/src/protocol/java/org/apache/jmeter/protocol/java/sampler/JSR223SamplerResources_fr.properties?rev=910765view=auto
==
--- 
jakarta/jmeter/trunk/src/protocol/java/org/apache/jmeter/protocol/java/sampler/JSR223SamplerResources_fr.properties
 (added)
+++ 
jakarta/jmeter/trunk/src/protocol/java/org/apache/jmeter/protocol/java/sampler/JSR223SamplerResources_fr.properties
 Tue Feb 16 23:28:02 2010
@@ -0,0 +1,29 @@
+#   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.
+
+#Stored by I18NEdit, may be edited!
+displayName=Echantillon JSR223
+filename.displayName=Nom de fichier
+filename.shortDescription=Fichier de script (remplace le script)
+filenameGroup.displayName=Fichier de script (remplace le script)
+parameterGroup.displayName=Param\u00E8tres \u00E0 passer au script (\= String 
Parameters and String []args)
+parameters.displayName=Param\u00E8tres 
+parameters.shortDescription=Param\u00E8tres \u00E0 passer au fichier ou au 
script
+script.displayName=Script 
+script.shortDescription=Script dans le langage JSR223 appropri\u00E9
+scriptLanguage.displayName=Langage 
+scriptLanguage.shortDescription=Nom du langage JSR223, i.e. beanshell, 
javascript, jexl, etc.
+scripting.displayName=Script (variables\: ctx vars props prev sampler log 
Label Filename Parameters args[] OUT)
+scriptingLanguage.displayName=Langage de script (i.e. groovy, beanshell, jexl, 
etc.)

Propchange: 
jakarta/jmeter/trunk/src/protocol/java/org/apache/jmeter/protocol/java/sampler/JSR223SamplerResources_fr.properties
--
svn:eol-style = native



-
To unsubscribe, e-mail: jmeter-dev-unsubscr...@jakarta.apache.org
For additional commands, e-mail: jmeter-dev-h...@jakarta.apache.org



DO NOT REPLY [Bug 48753] CookieManager is not available when run with jdk 1.6.0_13

2010-02-16 Thread bugzilla
https://issues.apache.org/bugzilla/show_bug.cgi?id=48753

--- Comment #2 from Florian Hopf h...@synyx.de 2010-02-16 23:32:17 UTC ---
Created an attachment (id=25003)
 -- (https://issues.apache.org/bugzilla/attachment.cgi?id=25003)
log file with ClassNotFoundException for commons-logging

-- 
Configure bugmail: https://issues.apache.org/bugzilla/userprefs.cgi?tab=email
--- You are receiving this mail because: ---
You are the assignee for the bug.

-
To unsubscribe, e-mail: jmeter-dev-unsubscr...@jakarta.apache.org
For additional commands, e-mail: jmeter-dev-h...@jakarta.apache.org



DO NOT REPLY [Bug 48753] CookieManager is not available when run with jdk 1.6.0_13

2010-02-16 Thread bugzilla
https://issues.apache.org/bugzilla/show_bug.cgi?id=48753

--- Comment #3 from Florian Hopf h...@synyx.de 2010-02-16 23:32:34 UTC ---
I am starting the application with jmeter.sh, no output is logged to the
console where I started it.

I just reviewed the log file, it complains about class not found for
commons-logging, which is available in the lib directory.

-- 
Configure bugmail: https://issues.apache.org/bugzilla/userprefs.cgi?tab=email
--- You are receiving this mail because: ---
You are the assignee for the bug.

-
To unsubscribe, e-mail: jmeter-dev-unsubscr...@jakarta.apache.org
For additional commands, e-mail: jmeter-dev-h...@jakarta.apache.org



DO NOT REPLY [Bug 48714] add new French messages

2010-02-16 Thread bugzilla
https://issues.apache.org/bugzilla/show_bug.cgi?id=48714

Sebb s...@apache.org changed:

   What|Removed |Added

 Status|REOPENED|RESOLVED
 Resolution||FIXED

--- Comment #5 from Sebb s...@apache.org 2010-02-16 23:34:07 UTC ---

URL: http://svn.apache.org/viewvc?rev=910765view=rev
Log:
Bug 48714 - add new French messages

Added:
  
jakarta/jmeter/trunk/src/protocol/java/org/apache/jmeter/protocol/java/sampler/JSR223SamplerResources_fr.properties
  (with props)

-- 
Configure bugmail: https://issues.apache.org/bugzilla/userprefs.cgi?tab=email
--- You are receiving this mail because: ---
You are the assignee for the bug.

-
To unsubscribe, e-mail: jmeter-dev-unsubscr...@jakarta.apache.org
For additional commands, e-mail: jmeter-dev-h...@jakarta.apache.org



DO NOT REPLY [Bug 48753] CookieManager is not available when run with jdk 1.6.0_13

2010-02-16 Thread bugzilla
https://issues.apache.org/bugzilla/show_bug.cgi?id=48753

--- Comment #4 from Sebb s...@apache.org 2010-02-16 23:41:11 UTC ---
The class org/apache/commons/logging/LogFactory is used by lots of JMeter
classes, so it does not make sense for it to only be reported for
CookieManager.

Are you using the same installation of JMeter for both JVMs?
Are you using any property overrides for logging?

-- 
Configure bugmail: https://issues.apache.org/bugzilla/userprefs.cgi?tab=email
--- You are receiving this mail because: ---
You are the assignee for the bug.

-
To unsubscribe, e-mail: jmeter-dev-unsubscr...@jakarta.apache.org
For additional commands, e-mail: jmeter-dev-h...@jakarta.apache.org



DO NOT REPLY [Bug 48753] CookieManager is not available when run with jdk 1.6.0_13

2010-02-16 Thread bugzilla
https://issues.apache.org/bugzilla/show_bug.cgi?id=48753

--- Comment #5 from Florian Hopf h...@synyx.de 2010-02-16 23:47:57 UTC ---
I am using the same installation for both, just replacing the java runtime does
the trick.

I did not modify any of the config files, the installation is downloaded,
unpacked and started.

I tried several version:
jakarta-jmeter-2.2: Entry is displayed but ClassNotFound-Exception is displayed
when trying to add it to a Thread-Group
jakarta-jmeter-2.3: Entry is not displayed
jakarta-jmeter-2.3.1: Entry is not displayed
jakarta-jmeter-2.3.4: Entry is not displayed

-- 
Configure bugmail: https://issues.apache.org/bugzilla/userprefs.cgi?tab=email
--- You are receiving this mail because: ---
You are the assignee for the bug.

-
To unsubscribe, e-mail: jmeter-dev-unsubscr...@jakarta.apache.org
For additional commands, e-mail: jmeter-dev-h...@jakarta.apache.org



DO NOT REPLY [Bug 48753] CookieManager is not available when run with jdk 1.6.0_13

2010-02-16 Thread bugzilla
https://issues.apache.org/bugzilla/show_bug.cgi?id=48753

--- Comment #6 from Sebb s...@apache.org 2010-02-17 00:12:24 UTC ---
I don't have any problems in Win/XP with

java.version=1.6.0_17  
java.vm.name=Java HotSpot(TM) Client VM

So in theory it's most likely to be a problem with Java.

Is there a more recent version of Java 1.6 for Kubuntu?

-- 
Configure bugmail: https://issues.apache.org/bugzilla/userprefs.cgi?tab=email
--- You are receiving this mail because: ---
You are the assignee for the bug.

-
To unsubscribe, e-mail: jmeter-dev-unsubscr...@jakarta.apache.org
For additional commands, e-mail: jmeter-dev-h...@jakarta.apache.org



svn commit: r910798 - /jakarta/jmeter/trunk/src/core/org/apache/jmeter/samplers/SampleResult.java

2010-02-16 Thread sebb
Author: sebb
Date: Wed Feb 17 01:57:20 2010
New Revision: 910798

URL: http://svn.apache.org/viewvc?rev=910798view=rev
Log:
Add setResponse() shorthand method

Modified:
jakarta/jmeter/trunk/src/core/org/apache/jmeter/samplers/SampleResult.java

Modified: 
jakarta/jmeter/trunk/src/core/org/apache/jmeter/samplers/SampleResult.java
URL: 
http://svn.apache.org/viewvc/jakarta/jmeter/trunk/src/core/org/apache/jmeter/samplers/SampleResult.java?rev=910798r1=910797r2=910798view=diff
==
--- jakarta/jmeter/trunk/src/core/org/apache/jmeter/samplers/SampleResult.java 
(original)
+++ jakarta/jmeter/trunk/src/core/org/apache/jmeter/samplers/SampleResult.java 
Wed Feb 17 01:57:20 2010
@@ -384,6 +384,20 @@
 responseMessage = OK_MSG;
 }
 
+/**
+ * Set result statuses OK - shorthand method to set:
+ * ul
+ * liResponseCode/li
+ * liResponseMessage/li
+ * liSuccessful status/li
+ * /ul
+ */
+public void setResponseOK(){
+setResponseCodeOK();
+setResponseMessageOK();
+setSuccessful(true);
+}
+
 public String getThreadName() {
 return threadName;
 }
@@ -537,8 +551,8 @@
 responseData = response.getBytes(encodeUsing);
 setDataEncoding(encodeUsing);
 } catch (UnsupportedEncodingException e) {
-log.warn(Could not convert string using +encodeUsing+
-, using default encoding: +DEFAULT_CHARSET+ 
+e.getLocalizedMessage());
+log.warn(Could not convert string using '+encodeUsing+
+', using default encoding: +DEFAULT_CHARSET+ 
+e.getLocalizedMessage());
 responseData = response.getBytes();
 setDataEncoding(DEFAULT_CHARSET);
 }
@@ -950,8 +964,10 @@
 public void setErrorCount(int i){// for reading from CSV files
 // ignored currently
 }
+
 /*
- * TODO: error counting needs to be sorted out after 2.3 final.
+ * TODO: error counting needs to be sorted out.
+ * 
  * At present the Statistical Sampler tracks errors separately
  * It would make sense to move the error count here, but this would
  * mean lots of changes.



-
To unsubscribe, e-mail: jmeter-dev-unsubscr...@jakarta.apache.org
For additional commands, e-mail: jmeter-dev-h...@jakarta.apache.org



svn commit: r910799 - in /jakarta/jmeter/trunk: src/protocol/mail/org/apache/jmeter/protocol/mail/sampler/gui/MailReaderSamplerGui.java xdocs/changes.xml

2010-02-16 Thread sebb
Author: sebb
Date: Wed Feb 17 02:08:03 2010
New Revision: 910799

URL: http://svn.apache.org/viewvc?rev=910799view=rev
Log: (empty)

Modified:

jakarta/jmeter/trunk/src/protocol/mail/org/apache/jmeter/protocol/mail/sampler/gui/MailReaderSamplerGui.java
jakarta/jmeter/trunk/xdocs/changes.xml

Modified: 
jakarta/jmeter/trunk/src/protocol/mail/org/apache/jmeter/protocol/mail/sampler/gui/MailReaderSamplerGui.java
URL: 
http://svn.apache.org/viewvc/jakarta/jmeter/trunk/src/protocol/mail/org/apache/jmeter/protocol/mail/sampler/gui/MailReaderSamplerGui.java?rev=910799r1=910798r2=910799view=diff
==
--- 
jakarta/jmeter/trunk/src/protocol/mail/org/apache/jmeter/protocol/mail/sampler/gui/MailReaderSamplerGui.java
 (original)
+++ 
jakarta/jmeter/trunk/src/protocol/mail/org/apache/jmeter/protocol/mail/sampler/gui/MailReaderSamplerGui.java
 Wed Feb 17 02:08:03 2010
@@ -113,18 +113,22 @@
 @Override
 public void configure(TestElement element) {
 MailReaderSampler mrs = (MailReaderSampler) element;
-if (mrs.getServerType().equals(MailReaderSampler.TYPE_POP3)) {
+final String serverType = mrs.getServerType();
+if (serverType.equals(MailReaderSampler.TYPE_POP3)) {
 serverTypeBox.setSelectedItem(POP3Label);
 folderBox.setText(INBOX);
-} else if (mrs.getServerType().equals(MailReaderSampler.TYPE_POP3S)) {
+} else if (serverType.equals(MailReaderSampler.TYPE_POP3S)) {
 serverTypeBox.setSelectedItem(POP3SLabel);
 folderBox.setText(INBOX);
-} else if (mrs.getServerType().equals(MailReaderSampler.TYPE_IMAPS)) {
+} else if (serverType.equals(MailReaderSampler.TYPE_IMAPS)) {
 serverTypeBox.setSelectedItem(IMAPSLabel);
 folderBox.setText(mrs.getFolder());
-} else {
+} else if (serverType.equals(MailReaderSampler.TYPE_IMAP)) {
 serverTypeBox.setSelectedItem(IMAPLabel);
 folderBox.setText(mrs.getFolder());
+} else {
+serverTypeBox.setSelectedItem(serverType);
+folderBox.setText(mrs.getFolder());
 }
 serverBox.setText(mrs.getServer());
 portBox.setText(mrs.getPort());
@@ -167,8 +171,10 @@
 mrs.setServerType(MailReaderSampler.TYPE_POP3S);
 } else if (item.equals(IMAPSLabel)){
 mrs.setServerType(MailReaderSampler.TYPE_IMAPS);
-} else {
+} else if (item.equals(IMAPLabel)){
 mrs.setServerType(MailReaderSampler.TYPE_IMAP);
+} else {
+mrs.setServerType(item);
 }
 
 mrs.setFolder(folderBox.getText());
@@ -203,6 +209,7 @@
 serverTypeModel.addElement(IMAPLabel);
 serverTypeModel.addElement(IMAPSLabel);
 serverTypeBox = new JComboBox(serverTypeModel);
+serverTypeBox.setEditable(true);
 serverTypeBox.addActionListener(new ActionListener() {
 public void actionPerformed(ActionEvent e) {
 final String item = (String) serverTypeBox.getSelectedItem();

Modified: jakarta/jmeter/trunk/xdocs/changes.xml
URL: 
http://svn.apache.org/viewvc/jakarta/jmeter/trunk/xdocs/changes.xml?rev=910799r1=910798r2=910799view=diff
==
--- jakarta/jmeter/trunk/xdocs/changes.xml (original)
+++ jakarta/jmeter/trunk/xdocs/changes.xml Wed Feb 17 02:08:03 2010
@@ -152,6 +152,7 @@
 liBug 47556 - JMS-PoinToPoint-Sampler Timout field should use Strings/li
 liBug 47947 - Mail Reader Sampler should allow port to be overridden/li
 liBug 48155 - Multiple problems / enhancements with JMS protocol classes/li
+liAllow MailReader sampler to use arbitrary protocols/li
 /ul
 
 h3Controllers/h3



-
To unsubscribe, e-mail: jmeter-dev-unsubscr...@jakarta.apache.org
For additional commands, e-mail: jmeter-dev-h...@jakarta.apache.org



svn commit: r910800 - in /jakarta/jmeter/trunk: src/jorphan/org/apache/jorphan/util/HeapDumper.java xdocs/changes.xml

2010-02-16 Thread sebb
Author: sebb
Date: Wed Feb 17 02:10:15 2010
New Revision: 910800

URL: http://svn.apache.org/viewvc?rev=910800view=rev
Log:
Add HeapDumper class for runtime generation of dumps

Added:
jakarta/jmeter/trunk/src/jorphan/org/apache/jorphan/util/HeapDumper.java   
(with props)
Modified:
jakarta/jmeter/trunk/xdocs/changes.xml

Added: jakarta/jmeter/trunk/src/jorphan/org/apache/jorphan/util/HeapDumper.java
URL: 
http://svn.apache.org/viewvc/jakarta/jmeter/trunk/src/jorphan/org/apache/jorphan/util/HeapDumper.java?rev=910800view=auto
==
--- jakarta/jmeter/trunk/src/jorphan/org/apache/jorphan/util/HeapDumper.java 
(added)
+++ jakarta/jmeter/trunk/src/jorphan/org/apache/jorphan/util/HeapDumper.java 
Wed Feb 17 02:10:15 2010
@@ -0,0 +1,209 @@
+/*
+ * 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.jorphan.util;
+
+import java.io.File;
+import java.io.IOException;
+import java.lang.management.ManagementFactory;
+import java.text.SimpleDateFormat;
+import java.util.Date;
+
+import javax.management.InstanceNotFoundException;
+import javax.management.MBeanException;
+import javax.management.MBeanServer;
+import javax.management.MalformedObjectNameException;
+import javax.management.ObjectName;
+import javax.management.RuntimeMBeanException;
+
+/**
+ * Class allowing access to Sun's heapDump method (Java 1.6+).
+ * Uses Reflection so that the code compiles on Java 1.5.
+ * The code will only work on Sun Java 1.6+.
+ */
+public class HeapDumper {
+
+// SingletonHolder idiom for lazy initialisation
+private static class DumperHolder {
+private static final HeapDumper DUMPER = new HeapDumper();
+}
+
+private static HeapDumper getInstance(){
+return DumperHolder.DUMPER;
+}
+
+// This is the name of the HotSpot Diagnostic platform MBean (Sun Java 1.6)
+// See: 
http://java.sun.com/javase/6/docs/jre/api/management/extension/com/sun/management/HotSpotDiagnosticMXBean.html
+private static final String HOTSPOT_BEAN_NAME =
+ com.sun.management:type=HotSpotDiagnostic;
+
+private static final SimpleDateFormat TIME_STAMP_FORMAT = new 
SimpleDateFormat(MMdd_hhmmss_SSS);
+
+// These are needed for invoking the method
+private final MBeanServer server;
+private final ObjectName hotspotDiagnosticBean;
+
+// If we could not find the method, store the exception here
+private final Exception exception;
+
+// Only invoked by IODH class
+private HeapDumper() {
+server = ManagementFactory.getPlatformMBeanServer(); // get the 
platform beans
+ObjectName on = null;
+Exception ex = null;
+try {
+on = new ObjectName(HOTSPOT_BEAN_NAME); // should never fail
+server.getObjectInstance(on); // See if we can actually find the 
object
+} catch (MalformedObjectNameException e) { // Should never happen
+throw new AssertionError(Could not establish the 
HotSpotDiagnostic Bean Name: +e);
+} catch (InstanceNotFoundException e) {
+ex = e;
+on = null; // Prevent useless dump attempts
+}
+exception = ex;
+hotspotDiagnosticBean = on;
+}
+
+/**
+ * Initialise the dumper, and report if there is a problem.
+ * This is optional, as the dump methods will initialise if necessary.
+ * 
+ * @throws Exception if there is a problem finding the heapDump MXBean
+ */
+public static void init() throws Exception {
+Exception e =getInstance().exception;
+if (e != null) {
+throw e;
+}
+}
+
+/**
+ * Dumps the heap to the outputFile file in the same format as the hprof 
heap dump.
+ * p
+ * Calls the dumpHeap() method of the HotSpotDiagnostic MXBean, if 
available.
+ * p
+ * See 
+ * a 
href=http://java.sun.com/javase/6/docs/jre/api/management/extension/com/sun/management/HotSpotDiagnosticMXBean.html;
+ * HotSpotDiagnosticMXBean
+ * /a
+ * @param fileName name of the heap dump file. Must be creatable, i.e. 
must not exist.
+ * @param live if true, dump only the live objects

svn commit: r910801 - in /jakarta/jmeter/trunk: src/protocol/mail/META-INF/ src/protocol/mail/org/apache/jmeter/protocol/mail/sampler/ xdocs/

2010-02-16 Thread sebb
Author: sebb
Date: Wed Feb 17 02:22:57 2010
New Revision: 910801

URL: http://svn.apache.org/viewvc?rev=910801view=rev
Log:
Basic read-only JavaMail provider implementation for reading raw mail files

Added:
jakarta/jmeter/trunk/src/protocol/mail/META-INF/
jakarta/jmeter/trunk/src/protocol/mail/META-INF/javamail.providers

jakarta/jmeter/trunk/src/protocol/mail/org/apache/jmeter/protocol/mail/sampler/MailFileFolder.java
   (with props)

jakarta/jmeter/trunk/src/protocol/mail/org/apache/jmeter/protocol/mail/sampler/MailFileMessage.java
   (with props)

jakarta/jmeter/trunk/src/protocol/mail/org/apache/jmeter/protocol/mail/sampler/MailFileStore.java
   (with props)
Modified:
jakarta/jmeter/trunk/xdocs/changes.xml

Added: jakarta/jmeter/trunk/src/protocol/mail/META-INF/javamail.providers
URL: 
http://svn.apache.org/viewvc/jakarta/jmeter/trunk/src/protocol/mail/META-INF/javamail.providers?rev=910801view=auto
==
--- jakarta/jmeter/trunk/src/protocol/mail/META-INF/javamail.providers (added)
+++ jakarta/jmeter/trunk/src/protocol/mail/META-INF/javamail.providers Wed Feb 
17 02:22:57 2010
@@ -0,0 +1 @@
+protocol=file; type=store; 
class=org.apache.jmeter.protocol.mail.sampler.MailFileStore; vendor=ASF
\ No newline at end of file

Added: 
jakarta/jmeter/trunk/src/protocol/mail/org/apache/jmeter/protocol/mail/sampler/MailFileFolder.java
URL: 
http://svn.apache.org/viewvc/jakarta/jmeter/trunk/src/protocol/mail/org/apache/jmeter/protocol/mail/sampler/MailFileFolder.java?rev=910801view=auto
==
--- 
jakarta/jmeter/trunk/src/protocol/mail/org/apache/jmeter/protocol/mail/sampler/MailFileFolder.java
 (added)
+++ 
jakarta/jmeter/trunk/src/protocol/mail/org/apache/jmeter/protocol/mail/sampler/MailFileFolder.java
 Wed Feb 17 02:22:57 2010
@@ -0,0 +1,176 @@
+/*
+ * 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.jmeter.protocol.mail.sampler;
+
+import java.io.File;
+import java.io.FileInputStream;
+import java.io.FileNotFoundException;
+import java.io.FilenameFilter;
+
+import javax.mail.Flags;
+import javax.mail.Folder;
+import javax.mail.Message;
+import javax.mail.MessagingException;
+import javax.mail.Store;
+import javax.mail.URLName;
+
+import org.apache.commons.io.IOUtils;
+
+public class MailFileFolder extends Folder {
+
+private static final String FILENAME_FORMAT = %d.msg;
+private static final String FILENAME_REGEX = \\d+\\.msg;
+private boolean isOpen;
+private final File folderPath;
+private static final FilenameFilter FILENAME_FILTER = new FilenameFilter(){
+public boolean accept(File dir, String name) {
+return name.matches(FILENAME_REGEX);
+}
+
+};
+
+public MailFileFolder(Store store, String path) {
+super(store);
+String base = store.getURLName().getHost(); // == ServerName from mail 
sampler
+folderPath = new File(base,path);
+}
+
+public MailFileFolder(Store store, URLName path) {
+this(store, path.getFile());
+}
+
+@Override
+public void appendMessages(Message[] messages) throws MessagingException {
+throw new MessagingException(Not supported);
+}
+
+@Override
+public void close(boolean expunge) throws MessagingException {
+this.store.close();
+isOpen = false;
+}
+
+@Override
+public boolean create(int type) throws MessagingException {
+return false;
+}
+
+@Override
+public boolean delete(boolean recurse) throws MessagingException {
+return false;
+}
+
+@Override
+public boolean exists() throws MessagingException {
+return true;
+}
+
+@Override
+public Message[] expunge() throws MessagingException {
+return null;
+}
+
+@Override
+public Folder getFolder(String name) throws MessagingException {
+return this;
+}
+
+@Override
+public String getFullName() {
+return this.toString();
+}
+
+@Override
+public Message getMessage(int index) throws MessagingException {
+File f = new 

svn commit: r910809 - /jakarta/jmeter/trunk/xdocs/usermanual/component_reference.xml

2010-02-16 Thread sebb
Author: sebb
Date: Wed Feb 17 03:16:17 2010
New Revision: 910809

URL: http://svn.apache.org/viewvc?rev=910809view=rev
Log:
Update for new Mail Reader facilities

Modified:
jakarta/jmeter/trunk/xdocs/usermanual/component_reference.xml

Modified: jakarta/jmeter/trunk/xdocs/usermanual/component_reference.xml
URL: 
http://svn.apache.org/viewvc/jakarta/jmeter/trunk/xdocs/usermanual/component_reference.xml?rev=910809r1=910808r2=910809view=diff
==
--- jakarta/jmeter/trunk/xdocs/usermanual/component_reference.xml (original)
+++ jakarta/jmeter/trunk/xdocs/usermanual/component_reference.xml Wed Feb 17 
03:16:17 2010
@@ -1326,7 +1326,10 @@
 /description
 properties
 property name=Name required=Descriptive name for this element that is 
shown in the tree./property
-property name=Server Type required=YesThe protocol used by the server: 
POP3, POP3S, IMAP, IMAPS/property
+property name=Server Type required=YesThe protocol used by the server: 
POP3, POP3S, IMAP, IMAPS
+or another string representing the server type.
+For example codefile/code for use with the read-only mail file provider.
+/property
 property name=Server required=YesHostname or IP address of the 
server/property
 property name=Port required=NoPort to be used to connect to the server 
(optional)/property
 property name=Username required=User login name/property
@@ -1334,8 +1337,23 @@
 property name=Folder required=Yes, if using IMAP(S)The IMAP(S) folder to 
use/property
 property name=Number of messages to retrieve required=YesSet this to 
retrieve all or some messages/property
 property name=Delete messages from the server required=YesIf set, 
messages will be deleted after retrieval/property
-property name=Store the message using MIME required=YesWhether to store 
the message as MIME. If not, fewer headers are stored (Date, To, From, 
Subject)./property
+property name=Store the message using MIME required=YesWhether to store 
the message as MIME. 
+If so, then the entire raw message is stored in the Response Data; the headers 
are not stored as they are available in the data. 
+If not, the message headers are stored as Response Headers. 
+A few headers are stored (Date, To, From, Subject) in the body.
+/property
 /properties
+p
+Messages are stored as subsamples of the main sampler.
+In versions of JMeter after 2.3.4, multipart message parts are stored as 
subsamples of the message.
+/p
+p
+The codefile/code JavaMail provider can be used to read raw messages from 
files.
+The codeserver/code field is used to specify the path to the parent of the 
codefolder/code.
+Individual message files should be stored with the name coden.msg/code,
+where coden/code is the message number.
+The current implementation is quite basic, and is mainly intended for 
debugging purposes. 
+/p
 /component
 
 component name=Test Action index=sect-num;.1.18  width=344 
height=181 screenshot=test_action.png



-
To unsubscribe, e-mail: jmeter-dev-unsubscr...@jakarta.apache.org
For additional commands, e-mail: jmeter-dev-h...@jakarta.apache.org



svn commit: r910810 - /jakarta/jmeter/trunk/build.xml

2010-02-16 Thread sebb
Author: sebb
Date: Wed Feb 17 03:17:03 2010
New Revision: 910810

URL: http://svn.apache.org/viewvc?rev=910810view=rev
Log:
Save provider file in jar

Modified:
jakarta/jmeter/trunk/build.xml

Modified: jakarta/jmeter/trunk/build.xml
URL: 
http://svn.apache.org/viewvc/jakarta/jmeter/trunk/build.xml?rev=910810r1=910809r2=910810view=diff
==
--- jakarta/jmeter/trunk/build.xml (original)
+++ jakarta/jmeter/trunk/build.xml Wed Feb 17 03:17:03 2010
@@ -906,6 +906,7 @@
 jar jarfile=${dest.jar}/ApacheJMeter_mail.jar 
manifest=${build.dir}/MANIFEST_BIN.MF
   fileset dir=${build.mail} includes=**/*.class  /
   fileset dir=${src.mail} includes=**/*.properties /
+fileset dir=${src.mail} includes=**/*.providers /
   metainf dir=. includes=LICENSE,NOTICE/
 /jar
 



-
To unsubscribe, e-mail: jmeter-dev-unsubscr...@jakarta.apache.org
For additional commands, e-mail: jmeter-dev-h...@jakarta.apache.org



svn commit: r910812 - /jakarta/jmeter/trunk/src/protocol/mail/org/apache/jmeter/protocol/mail/sampler/MailReaderSampler.java

2010-02-16 Thread sebb
Author: sebb
Date: Wed Feb 17 03:38:00 2010
New Revision: 910812

URL: http://svn.apache.org/viewvc?rev=910812view=rev
Log:
Add support for multipart messages
Avoid possible NPEs in To: and From: processing
Store Response Headers if not using store as MIME

Modified:

jakarta/jmeter/trunk/src/protocol/mail/org/apache/jmeter/protocol/mail/sampler/MailReaderSampler.java

Modified: 
jakarta/jmeter/trunk/src/protocol/mail/org/apache/jmeter/protocol/mail/sampler/MailReaderSampler.java
URL: 
http://svn.apache.org/viewvc/jakarta/jmeter/trunk/src/protocol/mail/org/apache/jmeter/protocol/mail/sampler/MailReaderSampler.java?rev=910812r1=910811r2=910812view=diff
==
--- 
jakarta/jmeter/trunk/src/protocol/mail/org/apache/jmeter/protocol/mail/sampler/MailReaderSampler.java
 (original)
+++ 
jakarta/jmeter/trunk/src/protocol/mail/org/apache/jmeter/protocol/mail/sampler/MailReaderSampler.java
 Wed Feb 17 03:38:00 2010
@@ -19,19 +19,24 @@
 
 import java.io.ByteArrayOutputStream;
 import java.io.IOException;
+import java.io.InputStream;
 import java.io.UnsupportedEncodingException;
+import java.util.Enumeration;
 import java.util.Properties;
 
 import javax.mail.Address;
 import javax.mail.BodyPart;
 import javax.mail.Flags;
 import javax.mail.Folder;
+import javax.mail.Header;
 import javax.mail.Message;
 import javax.mail.MessagingException;
 import javax.mail.Session;
 import javax.mail.Store;
 import javax.mail.internet.MimeMultipart;
+import javax.mail.internet.MimeUtility;
 
+import org.apache.commons.io.IOUtils;
 import org.apache.jmeter.samplers.AbstractSampler;
 import org.apache.jmeter.samplers.Entry;
 import org.apache.jmeter.samplers.SampleResult;
@@ -86,12 +91,10 @@
 boolean deleteMessages = getDeleteMessages();
 
 parent.setSampleLabel(getName());
-int port=getPortAsInt();
-if (port  0){
-parent.setSamplerData(getServerType() + :// + getUserName() + 
@ + getServer()+ : + port);
-} else {
-parent.setSamplerData(getServerType() + :// + getUserName() + 
@ + getServer());
-}
+
+String samplerString = toString();
+parent.setSamplerData(samplerString);
+
 /*
  * Perform the sampling
  */
@@ -105,11 +108,7 @@
 
 // Get the store
 Store store = session.getStore(getServerType());
-if (port  0){
-store.connect(getServer(), port, getUserName(), getPassword());
-} else {
-store.connect(getServer(), getUserName(), getPassword());
-}
+store.connect(getServer(), getPortAsInt(), getUserName(), 
getPassword());
 
 // Get folder
 Folder folder = store.getFolder(getFolder());
@@ -121,47 +120,66 @@
 
 // Get directory
 Message messages[] = folder.getMessages();
-Message message;
 StringBuilder pdata = new StringBuilder();
 pdata.append(messages.length);
 pdata.append( messages found\n);
+parent.setResponseData(pdata.toString(),null);
+parent.setDataType(SampleResult.TEXT);
+parent.setContentType(text/plain); // $NON-NLS-1$
 
 int n = getNumMessages();
 if (n == ALL_MESSAGES || n  messages.length) {
 n = messages.length;
 }
 
+parent.setSampleCount(n); // TODO is this sensible?
+
 for (int i = 0; i  n; i++) {
 StringBuilder cdata = new StringBuilder();
 SampleResult child = new SampleResult();
 child.sampleStart();
-message = messages[i];
-
-//if (i == 0)
-{ // Assumes all the messaged have the same type ...
-child.setContentType(message.getContentType());
-}
-
+Message message = messages[i];
+
 cdata.append(Message ); // $NON-NLS-1$
 cdata.append(message.getMessageNumber());
 child.setSampleLabel(cdata.toString());
 child.setSamplerData(cdata.toString());
 cdata.setLength(0);
 
+final String contentType = message.getContentType();
+child.setContentType(contentType);// Store the content-type
+
 if (isStoreMimeMessage()) {
-appendMessageAsMime(cdata, message);
+// Don't save headers - they are already in the raw message
+ByteArrayOutputStream bout = new ByteArrayOutputStream();
+message.writeTo(bout);
+child.setResponseData(bout.toByteArray()); // Save raw 
message
+child.setDataType(SampleResult.TEXT);
+child.setDataEncoding(iso-8859-1); // RFC 822 uses ascii
+

svn commit: r910820 - /jakarta/jmeter/trunk/src/protocol/mail/org/apache/jmeter/protocol/mail/sampler/MailReaderSampler.java

2010-02-16 Thread sebb
Author: sebb
Date: Wed Feb 17 04:52:39 2010
New Revision: 910820

URL: http://svn.apache.org/viewvc?rev=910820view=rev
Log:
Forgot to call sampleStart()

Modified:

jakarta/jmeter/trunk/src/protocol/mail/org/apache/jmeter/protocol/mail/sampler/MailReaderSampler.java

Modified: 
jakarta/jmeter/trunk/src/protocol/mail/org/apache/jmeter/protocol/mail/sampler/MailReaderSampler.java
URL: 
http://svn.apache.org/viewvc/jakarta/jmeter/trunk/src/protocol/mail/org/apache/jmeter/protocol/mail/sampler/MailReaderSampler.java?rev=910820r1=910819r2=910820view=diff
==
--- 
jakarta/jmeter/trunk/src/protocol/mail/org/apache/jmeter/protocol/mail/sampler/MailReaderSampler.java
 (original)
+++ 
jakarta/jmeter/trunk/src/protocol/mail/org/apache/jmeter/protocol/mail/sampler/MailReaderSampler.java
 Wed Feb 17 04:52:39 2010
@@ -262,6 +262,7 @@
 sr.setContentType(contentType);
 sr.setEncodingAndType(contentType);
 sr.setResponseHeaders(bodyPart.getClass().getName());// TODO
+sr.sampleStart();
 if (bodyPartContent instanceof InputStream){
 sr.setResponseData(IOUtils.toByteArray((InputStream) 
bodyPartContent));
 } else {



-
To unsubscribe, e-mail: jmeter-dev-unsubscr...@jakarta.apache.org
For additional commands, e-mail: jmeter-dev-h...@jakarta.apache.org



svn commit: r910824 - /jakarta/jmeter/trunk/src/protocol/mail/org/apache/jmeter/protocol/mail/sampler/MailReaderSampler.java

2010-02-16 Thread sebb
Author: sebb
Date: Wed Feb 17 05:04:26 2010
New Revision: 910824

URL: http://svn.apache.org/viewvc?rev=910824view=rev
Log:
Fix duplicate child.sampleEnd() calls

Modified:

jakarta/jmeter/trunk/src/protocol/mail/org/apache/jmeter/protocol/mail/sampler/MailReaderSampler.java

Modified: 
jakarta/jmeter/trunk/src/protocol/mail/org/apache/jmeter/protocol/mail/sampler/MailReaderSampler.java
URL: 
http://svn.apache.org/viewvc/jakarta/jmeter/trunk/src/protocol/mail/org/apache/jmeter/protocol/mail/sampler/MailReaderSampler.java?rev=910824r1=910823r2=910824view=diff
==
--- 
jakarta/jmeter/trunk/src/protocol/mail/org/apache/jmeter/protocol/mail/sampler/MailReaderSampler.java
 (original)
+++ 
jakarta/jmeter/trunk/src/protocol/mail/org/apache/jmeter/protocol/mail/sampler/MailReaderSampler.java
 Wed Feb 17 05:04:26 2010
@@ -180,7 +180,9 @@
 message.setFlag(Flags.Flag.DELETED, true);
 }
 child.setResponseOK();
-child.sampleEnd();
+if (child.getEndTime()==0){// Avoid double-call if 
addSubResult was called.
+child.sampleEnd();
+}
 parent.addSubResult(child);
 }
 
@@ -261,7 +263,6 @@
 sr.setSampleLabel(Part: +j);
 sr.setContentType(contentType);
 sr.setEncodingAndType(contentType);
-sr.setResponseHeaders(bodyPart.getClass().getName());// TODO
 sr.sampleStart();
 if (bodyPartContent instanceof InputStream){
 sr.setResponseData(IOUtils.toByteArray((InputStream) 
bodyPartContent));



-
To unsubscribe, e-mail: jmeter-dev-unsubscr...@jakarta.apache.org
For additional commands, e-mail: jmeter-dev-h...@jakarta.apache.org