jmeter-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From pmoua...@apache.org
Subject svn commit: r1765448 - in /jmeter/trunk/src/protocol: ftp/org/apache/jmeter/protocol/ftp/sampler/ jms/org/apache/jmeter/protocol/jms/sampler/ mail/org/apache/jmeter/protocol/smtp/sampler/ mail/org/apache/jmeter/protocol/smtp/sampler/tools/
Date Tue, 18 Oct 2016 14:35:43 GMT
Author: pmouawad
Date: Tue Oct 18 14:35:43 2016
New Revision: 1765448

URL: http://svn.apache.org/viewvc?rev=1765448&view=rev
Log:
Bug 53039 - HTTP Request : Be able to handle responses which size exceeds 2147483647 bytes
Fix deprecated calls to setBytes(int)
Bugzilla Id: 53039

Modified:
    jmeter/trunk/src/protocol/ftp/org/apache/jmeter/protocol/ftp/sampler/FTPSampler.java
    jmeter/trunk/src/protocol/jms/org/apache/jmeter/protocol/jms/sampler/SubscriberSampler.java
    jmeter/trunk/src/protocol/mail/org/apache/jmeter/protocol/smtp/sampler/SmtpSampler.java
    jmeter/trunk/src/protocol/mail/org/apache/jmeter/protocol/smtp/sampler/tools/CounterOutputStream.java

Modified: jmeter/trunk/src/protocol/ftp/org/apache/jmeter/protocol/ftp/sampler/FTPSampler.java
URL: http://svn.apache.org/viewvc/jmeter/trunk/src/protocol/ftp/org/apache/jmeter/protocol/ftp/sampler/FTPSampler.java?rev=1765448&r1=1765447&r2=1765448&view=diff
==============================================================================
--- jmeter/trunk/src/protocol/ftp/org/apache/jmeter/protocol/ftp/sampler/FTPSampler.java (original)
+++ jmeter/trunk/src/protocol/ftp/org/apache/jmeter/protocol/ftp/sampler/FTPSampler.java Tue
Oct 18 14:35:43 2016
@@ -210,10 +210,10 @@ public class FTPSampler extends Abstract
                         if (contents.length() > 0){
                             byte[] bytes = contents.getBytes(); // TODO - charset?
                             input = new ByteArrayInputStream(bytes);
-                            res.setBytes(bytes.length);
+                            res.setBytes((long)bytes.length);
                         } else {
                             File infile = new File(local);
-                            res.setBytes((int)infile.length());
+                            res.setBytes(infile.length());
                             input = new BufferedInputStream(new FileInputStream(infile));
                         }
                         ftpOK = ftp.storeFile(remote, input);
@@ -249,7 +249,7 @@ public class FTPSampler extends Abstract
                                     res.setDataType(SampleResult.TEXT);
                                 }
                             } else {
-                                res.setBytes((int) bytes);
+                                res.setBytes(bytes);
                             }
                         }
                     }

Modified: jmeter/trunk/src/protocol/jms/org/apache/jmeter/protocol/jms/sampler/SubscriberSampler.java
URL: http://svn.apache.org/viewvc/jmeter/trunk/src/protocol/jms/org/apache/jmeter/protocol/jms/sampler/SubscriberSampler.java?rev=1765448&r1=1765447&r2=1765448&view=diff
==============================================================================
--- jmeter/trunk/src/protocol/jms/org/apache/jmeter/protocol/jms/sampler/SubscriberSampler.java
(original)
+++ jmeter/trunk/src/protocol/jms/org/apache/jmeter/protocol/jms/sampler/SubscriberSampler.java
Tue Oct 18 14:35:43 2016
@@ -191,7 +191,7 @@ public class SubscriberSampler extends B
         if (getReadResponseAsBoolean()) {
             result.setResponseData(buffer.toString().getBytes()); // TODO - charset?
         } else {
-            result.setBytes(buffer.toString().length());
+            result.setBytes((long)buffer.toString().length());
         }
         result.setResponseHeaders(propBuffer.toString());
         if (read == 0) {

Modified: jmeter/trunk/src/protocol/mail/org/apache/jmeter/protocol/smtp/sampler/SmtpSampler.java
URL: http://svn.apache.org/viewvc/jmeter/trunk/src/protocol/mail/org/apache/jmeter/protocol/smtp/sampler/SmtpSampler.java?rev=1765448&r1=1765447&r2=1765448&view=diff
==============================================================================
--- jmeter/trunk/src/protocol/mail/org/apache/jmeter/protocol/smtp/sampler/SmtpSampler.java
(original)
+++ jmeter/trunk/src/protocol/mail/org/apache/jmeter/protocol/smtp/sampler/SmtpSampler.java
Tue Oct 18 14:35:43 2016
@@ -204,7 +204,7 @@ public class SmtpSampler extends Abstrac
                 message.writeTo(cs);
                 res.setBytes(cs.getCount());
             } else {
-                res.setBytes(-1);
+                res.setBytes(-1L);
             }
 
         } catch (Exception ex) {

Modified: jmeter/trunk/src/protocol/mail/org/apache/jmeter/protocol/smtp/sampler/tools/CounterOutputStream.java
URL: http://svn.apache.org/viewvc/jmeter/trunk/src/protocol/mail/org/apache/jmeter/protocol/smtp/sampler/tools/CounterOutputStream.java?rev=1765448&r1=1765447&r2=1765448&view=diff
==============================================================================
--- jmeter/trunk/src/protocol/mail/org/apache/jmeter/protocol/smtp/sampler/tools/CounterOutputStream.java
(original)
+++ jmeter/trunk/src/protocol/mail/org/apache/jmeter/protocol/smtp/sampler/tools/CounterOutputStream.java
Tue Oct 18 14:35:43 2016
@@ -24,7 +24,7 @@ import java.io.OutputStream;
  * Utility-class to calculate message size.
  */
 public class CounterOutputStream extends OutputStream {
-    int count = 0;
+    private long count = 0;
 
     /**
      * {@inheritDoc}
@@ -58,7 +58,7 @@ public class CounterOutputStream extends
      * Returns message size
      * @return Message size
      */
-    public int getCount() {
+    public long getCount() {
         return count;
     }
 }



Mime
View raw message