Return-Path: X-Original-To: apmail-jmeter-user-archive@www.apache.org Delivered-To: apmail-jmeter-user-archive@www.apache.org Received: from mail.apache.org (hermes.apache.org [140.211.11.3]) by minotaur.apache.org (Postfix) with SMTP id B9F47EB54 for ; Thu, 29 Nov 2012 21:46:31 +0000 (UTC) Received: (qmail 96688 invoked by uid 500); 29 Nov 2012 21:46:31 -0000 Delivered-To: apmail-jmeter-user-archive@jmeter.apache.org Received: (qmail 96663 invoked by uid 500); 29 Nov 2012 21:46:31 -0000 Mailing-List: contact user-help@jmeter.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: "JMeter Users List" Delivered-To: mailing list user@jmeter.apache.org Received: (qmail 96654 invoked by uid 99); 29 Nov 2012 21:46:31 -0000 Received: from athena.apache.org (HELO athena.apache.org) (140.211.11.136) by apache.org (qpsmtpd/0.29) with ESMTP; Thu, 29 Nov 2012 21:46:30 +0000 X-ASF-Spam-Status: No, hits=1.5 required=5.0 tests=HTML_MESSAGE,RCVD_IN_DNSWL_LOW,SPF_PASS X-Spam-Check-By: apache.org Received-SPF: pass (athena.apache.org: domain of philippe.mouawad@gmail.com designates 209.85.223.171 as permitted sender) Received: from [209.85.223.171] (HELO mail-ie0-f171.google.com) (209.85.223.171) by apache.org (qpsmtpd/0.29) with ESMTP; Thu, 29 Nov 2012 21:46:25 +0000 Received: by mail-ie0-f171.google.com with SMTP id 17so17775081iea.2 for ; Thu, 29 Nov 2012 13:46:05 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=mime-version:in-reply-to:references:date:message-id:subject:from:to :content-type; bh=+6y3NhUFG1+7OkhoSoVPrDRmix3r/5Rz/M3YhMIQ8TQ=; b=YXvUfOpNNYaDAxIFpNWQDoN2XWDViik5MLzEj+/Ist08rKOL6EuffsRmwcIfU5AdQe XJM6i5NDFT9x3r37iemeta+rggoYWV9yZNdp7LMLIWsfdug9uTszPauKKO3JLQZNjnZa 6TMrcVgE4BKxywoj8/EVSwRD1WloAn34BItSIiqvhR5PpzfatjvP24EEdPMUE3RECuGK sihtCCozyR3nuWp1SKnimcdrR8fdOcmEH72n7LSAbSWs4hF3IwJX6bhpE8lThl0zxdGj x0CwXN1VCKAdGbh1ZguZYgSDxnfL+C5Q7l6Q275G++W7gM9gURHWxqAEI337w5gUq5a5 e3eQ== MIME-Version: 1.0 Received: by 10.50.11.167 with SMTP id r7mr24629143igb.18.1354225565046; Thu, 29 Nov 2012 13:46:05 -0800 (PST) Received: by 10.64.136.175 with HTTP; Thu, 29 Nov 2012 13:46:04 -0800 (PST) In-Reply-To: <324897AED6FD3042A9C6D46E230DB791E7F8E91733@EXCHMAIL.national.aaa.com> References: <324897AED6FD3042A9C6D46E230DB791E7F8E916E8@EXCHMAIL.national.aaa.com> <324897AED6FD3042A9C6D46E230DB791E7F8E91733@EXCHMAIL.national.aaa.com> Date: Thu, 29 Nov 2012 22:46:04 +0100 Message-ID: Subject: Re: Odd behavior of JDBC Sampler From: Philippe Mouawad To: JMeter Users List Content-Type: multipart/alternative; boundary=e89a8f64671fc018a004cfa9359d X-Virus-Checked: Checked by ClamAV on apache.org --e89a8f64671fc018a004cfa9359d Content-Type: text/plain; charset=ISO-8859-1 Hello, What is the config of your JDBC Sampler regarding transactional attribute ? and other attributes Regards Philippe On Thu, Nov 29, 2012 at 10:31 PM, Daleiden, Mike wrote: > 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 > > -- Cordialement. Philippe Mouawad. --e89a8f64671fc018a004cfa9359d--