mytap
mytap copied to clipboard
Question: is it possible to use mytap to check deadlock issue?
Hi all,
This project is great to offer the way to unit test SQL. I searched in this project and googled a lot, but still not found how to write mytap test to check deadlock issue, can you give me 1 example about this?
Thanks so much.
Can you be more specific? Can you describe the issue you want to test?
To be specific, I want to check deadlock caused by gap locking of mysql when simultaneously insert into same table based on different transaction isolation level (REPEATABLE READ vs. READ COMMITTED).
I am almost sure it's not possible. You had to have an option to perform assertions using more than one connection (or thread) in one time.
You will have to find another solution to use two connections in the same time.
Hi @sq6jnx sq, Thanks for your response. This limitation (open only 1 connection) is for myTap only, or for all TAP unit test framework for sql like pgTap also? Do you have any advice about other SQL unit test framework?
Thanks.
The MyTAP framework uses only the available statements that MySQL provides, i.e. if you can't create a statement that can do what you want, then it cannot be done with the MyTAP framework.