tests: update tests for totalItems leak fix