Added test to cover sql insert async and graceful failure