jmeter-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Daleiden, Mike" <MDalei...@national.aaa.com>
Subject RE: Odd behavior of JDBC Sampler
Date Thu, 29 Nov 2012 21:31:47 GMT
I did that with no effect. I even played with a delay of up to 10 seconds. The thing is that
once the HTTP sampler returns, the audit record has already been written to the database,
as that is done as part of the JSON service itself.

--Mike


-----Original Message-----
From: chaitanya bhatt [mailto:bhatt.chaitanya@gmail.com]
Sent: Thursday, November 29, 2012 4:29 PM
To: JMeter Users List
Subject: Re: Odd behavior of JDBC Sampler

Try introducing a small delay between the HTTP sampler and JDBC sampler.

Thanks
Chaitanya

On Thu, Nov 29, 2012 at 12:29 PM, Daleiden, Mike <MDaleiden@national.aaa.com
> wrote:

> I have a JMeter test plan that is used to execute a test of a
> JSON-based web service. Part of the validation for this test requires
> that the underlying MySQL database is checked for the existence of a
> record containing a data element unique to the request. The unique
> data element content is being generated by JMeter using the
> ${__time()} function. The test successfully executes the JSON service,
> but for some reason the JDBC sampler that follows immediately after
> the HTTP sampler (for the JSON
> request) does not return the data correctly. The query is very
> straightforward:
>
> SELECT correlationId
> FROM testdb.audit_log
> WHERE service = 'jsonService'
> ORDER BY create_timestamp DESC LIMIT 5
>
> When this query is executed by the sampler, it returns the following:
>
>     correlationId
>     20121129150230526
>     20121129142656490
>     20121129141800995
>     20121129141703545
>     20121129141548601
>
> However, the same query executed against the test database (which is
> not being used by any other processes or users) immediately after the
> JMeter test completes returns the following:
>
>     20121129150411820
>     20121129150230526
>     20121129142656490
>     20121129141800995
>     20121129141703545
>
> Note that the first record returned by the direct database query is
> NOT in the resultset return from the EXACT SAME QUERY executed by the
> JDBC Sampler. I have executed this test multiple times to ensure that
> this behavior consistently occurs. Each and every test run exhibits
> this same OFF BY ONE issue with the JDBC Sampler result.
>
> Any thoughts on why this might be occurring would be greatly appreciated.
>
> --Mike Daleiden
>
>
>
>
>   ________________________________
> This communication (including all attachments) is intended solely for
> the use of the person(s) to whom it is addressed and should be treated
> as a confidential AAA communication. If you are not the intended
> recipient, any use, distribution, printing, or copying of this email
> is strictly prohibited. If you received this email in error, please
> immediately delete it from your system and notify the originator. Your
> cooperation is appreciated.
>

This communication (including all attachments) is intended solely for
the use of the person(s) to whom it is addressed and should be treated
as a confidential AAA communication.  If you are not the intended
recipient, any use, distribution, printing, or copying of this email is
strictly prohibited.  If you received this email in error, please
immediately delete it from your system and notify the originator.  Your
cooperation is appreciated.


---------------------------------------------------------------------
To unsubscribe, e-mail: user-unsubscribe@jmeter.apache.org
For additional commands, e-mail: user-help@jmeter.apache.org


Mime
View raw message