Below are the two steps which we have to execute:
Step 1: Fetch All Packages
Step 2: Update the Status of Single Package by Package Id
If we execute this with single Thread then it works properly but with mutiple threads, It is giving 409 Conflict on Second API
I am fetching Package Id based on thread number and passing to next step
<code>int threadNo = ctx.getThreadNum()+1; //to get the thread number in beanshell
vars.put("p_PackageId",json.id[threadNo]);
</code>
<code>int threadNo = ctx.getThreadNum()+1; //to get the thread number in beanshell
vars.put("p_PackageId",json.id[threadNo]);
</code>
int threadNo = ctx.getThreadNum()+1; //to get the thread number in beanshell
vars.put("p_PackageId",json.id[threadNo]);
Issue is Two threads trying to update same Package
Logs:
<code>2024-06-11 22:36:33,411 INFO o.a.j.e.J.JSR223 PostProcessor: *************************Fetch Package Id's*********
2024-06-11 22:36:33,414 INFO o.a.j.e.J.JSR223 PostProcessor: Package Id ---------->1etmKNrSmL21gM2i1hAAxB ThreadNumber --> 21
2024-06-11 22:36:33,416 INFO o.a.j.t.JMeterThread: Thread is done: TEST ---- Thread Group- Creator UI- Direct To Print - Single Authentication - e-2-e 1-24
2024-06-11 22:36:33,416 INFO o.a.j.t.JMeterThread: Thread finished: TEST ---- Thread Group- Creator UI- Direct To Print - Single Authentication - e-2-e 1-24
2024-06-11 22:36:33,422 INFO o.a.j.e.J.JSR223 PostProcessor: *************************Fetch Package Id's*********
2024-06-11 22:36:33,425 INFO o.a.j.e.J.JSR223 PostProcessor: Package Id ---------->M7942VGOiwiRvY0pSbGQX ThreadNumber --> 15
2024-06-11 22:36:33,456 INFO o.a.j.e.J.JSR223 PostProcessor: *************************Fetch Package Id's*********
2024-06-11 22:36:33,459 INFO o.a.j.e.J.JSR223 PostProcessor: Package Id ---------->1etmKNrSmL21gM2i1hAAxB ThreadNumber --> 26
</code>
<code>2024-06-11 22:36:33,411 INFO o.a.j.e.J.JSR223 PostProcessor: *************************Fetch Package Id's*********
2024-06-11 22:36:33,414 INFO o.a.j.e.J.JSR223 PostProcessor: Package Id ---------->1etmKNrSmL21gM2i1hAAxB ThreadNumber --> 21
2024-06-11 22:36:33,416 INFO o.a.j.t.JMeterThread: Thread is done: TEST ---- Thread Group- Creator UI- Direct To Print - Single Authentication - e-2-e 1-24
2024-06-11 22:36:33,416 INFO o.a.j.t.JMeterThread: Thread finished: TEST ---- Thread Group- Creator UI- Direct To Print - Single Authentication - e-2-e 1-24
2024-06-11 22:36:33,422 INFO o.a.j.e.J.JSR223 PostProcessor: *************************Fetch Package Id's*********
2024-06-11 22:36:33,425 INFO o.a.j.e.J.JSR223 PostProcessor: Package Id ---------->M7942VGOiwiRvY0pSbGQX ThreadNumber --> 15
2024-06-11 22:36:33,456 INFO o.a.j.e.J.JSR223 PostProcessor: *************************Fetch Package Id's*********
2024-06-11 22:36:33,459 INFO o.a.j.e.J.JSR223 PostProcessor: Package Id ---------->1etmKNrSmL21gM2i1hAAxB ThreadNumber --> 26
</code>
2024-06-11 22:36:33,411 INFO o.a.j.e.J.JSR223 PostProcessor: *************************Fetch Package Id's*********
2024-06-11 22:36:33,414 INFO o.a.j.e.J.JSR223 PostProcessor: Package Id ---------->1etmKNrSmL21gM2i1hAAxB ThreadNumber --> 21
2024-06-11 22:36:33,416 INFO o.a.j.t.JMeterThread: Thread is done: TEST ---- Thread Group- Creator UI- Direct To Print - Single Authentication - e-2-e 1-24
2024-06-11 22:36:33,416 INFO o.a.j.t.JMeterThread: Thread finished: TEST ---- Thread Group- Creator UI- Direct To Print - Single Authentication - e-2-e 1-24
2024-06-11 22:36:33,422 INFO o.a.j.e.J.JSR223 PostProcessor: *************************Fetch Package Id's*********
2024-06-11 22:36:33,425 INFO o.a.j.e.J.JSR223 PostProcessor: Package Id ---------->M7942VGOiwiRvY0pSbGQX ThreadNumber --> 15
2024-06-11 22:36:33,456 INFO o.a.j.e.J.JSR223 PostProcessor: *************************Fetch Package Id's*********
2024-06-11 22:36:33,459 INFO o.a.j.e.J.JSR223 PostProcessor: Package Id ---------->1etmKNrSmL21gM2i1hAAxB ThreadNumber --> 26