JiriOndrusek commented on PR #6001:
URL: https://github.com/apache/camel-quarkus/pull/6001#issuecomment-2058469978

   > Just so I understand things better. The docs state `Simple locking 
mechanism is implemented for the test to allow parallel executions.`.
   > 
   > What that means is that if you start parallel test executions, they will 
be queued and wait for each other to complete?
   
   I used a keyed dataque (FIFO). 
   
   - Each participant saves unique token into a key `cq.jt400.global-lock`
   - Each participant the reads the FIFO queue and if the resulted string is 
its own unique token, execution is allowed
   - When execution ends, the key is removed
   
   If the token is not its own
   - read of the token is repeated until timeout or its own token is returned 
(so the second participant waits, until the first participant removes its token)
   
   Dead lock prevention
   - part of the unique token is timestamp, if participant finds a token, which 
is too old, token is removed
   - action to clear-all data removes also the locking tokens
   
   I tested the scenario several times with 9 parallel executions 
   
   
   
   
   


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: commits-unsubscr...@camel.apache.org

For queries about this service, please contact Infrastructure at:
us...@infra.apache.org

Reply via email to