Sometimes, some database integration tests fail, without obvious changes to the code that could explain why.
After (a long) investigation, it turns out you should never write use ForgeConfigSandbox in a DB integration test. It will generate an instance of CodendiDataAccess with invalid DB credentials, which will make all subsequent requests by older DAO (the ones still extending \DataAccessObject) fail. The requests will fail despite the data being present, simply because the DAO cannot access the actual DB. The same requests made with DBFactory::getMainTuleapDBConnection()->getDB() will succeed, because it does not go through the same cache.
Removing the trait makes the test suite pass again.