Fixed race confition in integration test.