added tests for retaining messages that didn't sent properly