Fix some resource warnings in tests.