make the test pass by synchronizing the document addition