In JMeter (v2.13 r1665067), I'm using the tearDown Thread Group to delete all of the left-over records that remain after a test run.
The odd thing I can't quite figure out:
When the Thread Group is executed in isolation (i.e., by itself), I am able to see the left-over records are deleted from within the database.
When the Thread Group is run as part of the full run (i.e., the full end-to-end test plan), the left-over records are not deleted from within the database.
Looking in SQL Profiler, it "appears" the DELETE is sent, yet the records remain in the db. Could it be my Constant Throughput settings or some other timing? Can anyone shed any light on why this happens only during a full run?
In the Test Plan, the Run tearDown Thread Groups after shutdown of main threads is enabled.
Here's what is in my tearDown Thread Group:
JDBC Connection Configuration
Variable Name = myPool
Connection Pool Config
Max # of Connections = 10
Pool Timeout = 5000
Idle Cleanup Interval (ms) = 60000
Auto Commit = True
Transaction Isolation = TRANSACTION_SERIALIZEABLE
Connection Validation by Pool
Keep-Alive = True
Max Connections Age = 5000
Validation Query = null
JDBC Request 1
Variable Name = myPool
Query Type = Prepared Update Statement
DELETE FROM Foo
WHERE Foo.QualifierObjId IN
(SELECT Bar.ObjId FROM Bar WHERE Bar.DsplyName like '%myTest%');
JDBC Request 2
Variable Name = myPool
Query Type = Prepared Update Statement
DELETE FROM Bar WHERE Bar.DsplyName like '%myTest%';
JDBC Request 3
Variable Name = myPool
Query Type = Prepared Update Statement
DELETE FROM Master WHERE Master.DsplyName like '%myTest%';