Bug 45093 - size assertion incorrectly processes the size of mime messages
size assertion incorrectly processes the size of mime messages
Status: RESOLVED FIXED
Product: JMeter
Classification: Unclassified
Component: Main
2.3.1
PC All
: P2 normal (vote)
: ---
Assigned To: JMeter issues mailing list
:
Depends on:
Blocks:
  Show dependency tree
 
Reported: 2008-05-29 01:55 UTC by Ralf Hauser
Modified: 2008-05-29 05:14 UTC (History)
1 user (show)



Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Ralf Hauser 2008-05-29 01:55:24 UTC
public AssertionResult org.apache.jmeter.assertions.getResult(SampleResult response) {

can be fixed with one different statement:

        long resultSize = resultData// .length;
                .getBytes();

this is useful for the MailReaderSamplers as per bug 45005

see also bug 45006 (to be able to easily fix this ourselves)
Comment 1 Sebb 2008-05-29 03:23:45 UTC
Please explain what is going wrong in a bit more detail - why does it only affect mime messages?
Comment 2 Michael Tschannen 2008-05-29 03:38:19 UTC
With MIME-messages, SizeAssertion currently takes the body length as "size" and does not include additional attachment(s). However, code above is not correct, it should be: 

     long resultSize = // resultData .length;
        response.getBytes();
Comment 3 Sebb 2008-05-29 03:47:37 UTC
Still not sure I understand.

Which sampler are you using?
Comment 4 Michael Tschannen 2008-05-29 04:11:49 UTC
MailReaderSampler (the enhanced one, but standard version should cause identical problems). We're receiving a MIME-message with attachment, but SizeAssertion doesn't include the attachment size into its counts. 
Comment 5 Sebb 2008-05-29 05:14:31 UTC
OK.

Some samplers don't store the full response data; but in that case they set the bytes count in the response. SizeAssertion did not take this into account.

Fixed in SVN:

URL: http://svn.apache.org/viewvc?rev=661311&view=rev
Log:
Bug 45093 - SizeAssertion did not call getBytes()