Change resource creation check in tests
Some resource generation may not happen if some tests failed. Make sure that resources are generated before use.
Some resource generation may not happen if some tests failed. Make sure that resources are generated before use.