Skip to content

Improve shared test reset: reset weather, time, effects, health, food… #3651

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

Draft
wants to merge 3 commits into
base: master
Choose a base branch
from

Conversation

rom1504
Copy link
Member

@rom1504 rom1504 commented May 18, 2025

…, gamerules, difficulty, and OP status to reduce flakiness across all tests.

…, gamerules, difficulty, and OP status to reduce flakiness across all tests.
@rom1504
Copy link
Member Author

rom1504 commented May 18, 2025

Built with copilot agent

@rom1504 rom1504 requested a review from Copilot May 18, 2025 13:33
Copy link

@Copilot Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull Request Overview

This PR expands the shared test setup by issuing additional in-game chat commands to reset environmental and player state, aiming to reduce test flakiness.

  • Injects chat commands to clear weather, set time, and enforce daylight/weather cycles
  • Clears all potion effects and attempts health/food reset
  • Resets difficulty and grants OP status to the test bot

rom1504 and others added 2 commits May 18, 2025 15:35
Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
@rom1504 rom1504 requested a review from Copilot May 18, 2025 13:37
Copy link

@Copilot Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull Request Overview

This PR aims to improve the shared test reset process by adding commands to reset weather, time, effects, health, food, gamerules, difficulty, and OP status for increased test reliability.

  • New chat commands are added for weather, time, health, food, gamerules, and OP status resets.
  • The reset sequence now includes commands to clear effects and adjust player attributes to reduce test flakiness.
Comments suppressed due to low confidence (1)

test/externalTests/plugins/testCommon.js:107

  • Issuing many chat commands in succession may risk command processing delays. Consider verifying individual command completions or adding incremental delays to ensure reliable execution in the test environment.
await sleep(1000)

@rom1504
Copy link
Member Author

rom1504 commented May 18, 2025

looked good but then following the suggestions of the gh agent reviewed it broke everything.

@rom1504
Copy link
Member Author

rom1504 commented May 18, 2025

The interaction loop between the agent and the environment is not great yet.

It should be able to quick run some internal simulation making a bet on what the consequence of its change will have on the CI

@rom1504 rom1504 marked this pull request as draft May 18, 2025 13:48
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.

1 participant