Fix the flaky tests.

Wait for get and store's to complete before verifying results.