[leveldb_proto] Fixed flaky migration test

Migration_EmptyDBs_UniqueToShared creates a unique DB and then destroys
it to attempt to run a migration, however, its destructor posts a task
to destroy the inner database object, which caused an error if the
second database tried to initialize before the first one is completely

This CL posts a task and waits before initializing the second database.

Bug: 950946
Change-Id: I274ebaa8d51f7294322e335c9c566b044de6b988
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/1579761
Reviewed-by: ssid <ssid@chromium.org>
Commit-Queue: Salvador Guerrero <salg@google.com>
Cr-Commit-Position: refs/heads/master@{#654063}
1 file changed