[#46283725] More optimizations for tests