Sort out flaky tests in base, io and gendb

Change-Id: I4cc912de8fe6d8b449682802ed42dc7395b1fc68