Writing a non-trivial concurrent system based on your understanding of the 'algorithm' , without relying on testing is much harder.
> I truly wonder if there is real world tests around this
Of course there are. There are many tools, methods, and test suites out there for concurrency testing, for almost any major language out there. Of course, understanding your algorithm, and the systems involved is required to write a proper test suite.
> For instance, get sql queries; You ran them, and you have no issue; Is your code sane ?
Take those queries and run them 1000x+ times concurrently in a loop. That will catch most common issues. If you want to go a step further you can build a setup to execute your queries in any desired order.