Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Suppress expected errors in resource unit tests #91028

Merged
merged 1 commit into from
Apr 23, 2024

Conversation

killzebug
Copy link
Contributor

The test "[Resource] Breaking circular references on save" produces errors

ERROR: Resource was not pre cached for the resource section, bug?
   at: _write_resource (scene/resources/resource_format_text.cpp:1882)
WARNING: Couldn't load resource (no cache): local://Resource_agy4p
     at: parse_variant (core/io/resource_format_binary.cpp:412)

The errors are intentional because the test uses uncached internal resources and as a result of the test the circular reference is broken. I tested out the branchpath in ResourceFormatSaverBinaryInstance::_find_resources that mentions circular references and found that it skips over internal resources.
I have only suppressed the parts that produce errors: saving to text and loading from binary.
Fixes: #80616

@killzebug killzebug requested a review from a team as a code owner April 22, 2024 20:25
@akien-mga
Copy link
Member

Thanks for the contribution! This seems sensible to me.

Could you amend the commit message to be more explicit? E.g. like you used for the PR itself.

@akien-mga akien-mga modified the milestones: 4.x, 4.3 Apr 22, 2024
@killzebug
Copy link
Contributor Author

Changed the comment, should be good to go.

@akien-mga akien-mga changed the title Suppressed expected errors in resource unit tests Suppress expected errors in resource unit tests Apr 23, 2024
@akien-mga akien-mga merged commit 05ffa26 into godotengine:master Apr 23, 2024
16 checks passed
@akien-mga
Copy link
Member

Thanks! And congrats for your first merged Godot contribution 🎉

@killzebug killzebug deleted the resourcetest branch April 23, 2024 17:57
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Error spam when running the test suite
2 participants