Fix precision mechanism crafting gametest failing sometimes#10164
Open
JensenJ wants to merge 3 commits intoCreators-of-Create:mc1.21.1/devfrom
Open
Fix precision mechanism crafting gametest failing sometimes#10164JensenJ wants to merge 3 commits intoCreators-of-Create:mc1.21.1/devfrom
JensenJ wants to merge 3 commits intoCreators-of-Create:mc1.21.1/devfrom
Conversation
Collaborator
|
I'm not too familiar with the random processing, but couldn't we make it use a fixed seed, too, so it always comes with the same outcome? That eliminates statistics
… Message ID: ***@***.***>
|
Collaborator
|
The law of large numbers is fairly reliable. That said, it's not infallible. Could replace the container with a creative crate and wait for all results to appear? Not strictly guaranteed to finish, though. |
Contributor
Author
|
Thanks for your responses. I've had a little look into seeing whether I can make it used a fixed seed, but I wasn't able to find anything in my brief search. Not really sure where to look though. Chucking a creative crate on the input and the deployers is probably the easiest alternate solution then, I'll probably up the test timeout as well to 30 seconds, to allow more to process. |
Contributor
Author
|
Okay, that's all done. I've updated original message at top of PR. Thanks. |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Hi there,
While doing PRs the last few days, I've had a couple of CI builds fail because of the precision mechanism gametest. I had a look into it and discovered that the test would fail if all 16 of the golden sheets in the test were successfully turned into precision mechanisms with no byproducts which is unlikely to happen (2.8% chance I think).
I've done a quick modification to the test which makes the possible results include the mechanism (it was excluded before) and we just pass if any of the results are in the chest. The other way of "fixing" this is to increase the amount of sheets we put through the test, as that would reduce the chance of this happening further. This may be more desirable if you want the test to ensure that the recipe doesn't have a 100% success rate which is probably why it was set up this way (so me removing this may defeat the purpose of the test and thus be an invalid fix). I can change this to put more sheets through if it's preferred, which I imagine it may be; but imo it still doesn't feel like a proper fix as it leaves it to statistics, meaning the issue could happen again.Ask if you want anything changed or you have any questions.
Also, let me know if this is not the correct way to address this issue; as I've typed this I've kinda convinced myself it's not the right way to fix it, but I'll leave it up to you.I've now changed this; I've modified the actual test nbt file to increase the number of precision mechanisms that are processed to reduce the chance of a fail drastically (less than 0.001%) as in thirty seconds (or equivalent ticks as gametests run faster) ~56 mechanism recipes are processed. I've used creative crates for the golden sheets and the deployer's needed items, so to reduce the chance of fail even further you can just increase the timeout and it should just work. I don't think you'll ever need to do that though.
Thanks,
Jensen