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

Improve setExtended by Removing Pollution in PotionTest #1125

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

maythefirst
Copy link

This PR aims to improve a test org.bukkit.potion.PotionTest.setExtended, which is non-idempotent and fails if run twice in the same JVM. The failure message is as follows

Tests in error: 
  setExtended(org.bukkit.potion.PotionTest): Cannot set already-set type

Tests run: 2, Failures: 0, Errors: 1, Skipped: 0

The reason for this is because it pollutes states (byId and byName in the main code) shared among tests.
Though it seems to be a minor issue, we propose that it might be good to clean this state pollution after the execution of this test so that some other tests do not fail in the future due to the shared state polluted by this test.

@TheKodeToad
Copy link

Not maintained anymore. Updated version (maintained by SpigotMC):
https://hub.spigotmc.org/stash/projects/SPIGOT/repos/bukkit/browse#contributing

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
2 participants