-
Notifications
You must be signed in to change notification settings - Fork 0
test(browser): bound ordinary teardown to one deadline #150
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
seonghobae
wants to merge
7
commits into
test/agent-task-forced-close-shared-teardown-deadline
Choose a base branch
from
test/agent-task-shared-teardown-deadline
base: test/agent-task-forced-close-shared-teardown-deadline
Could not load branches
Branch not found: {{ refName }}
Loading
Could not load tags
Nothing to show
Loading
Are you sure you want to change the base?
Some commits from the old base branch may be removed from the timeline,
and old review comments may become outdated.
Draft
Changes from all commits
Commits
Show all changes
7 commits
Select commit
Hold shift + click to select a range
b15be4b
test(browser): require one ordinary teardown deadline
seonghobae bca8380
fix(browser): share ordinary teardown deadline
seonghobae f67e895
test(browser): align failure evidence with shared teardown
seonghobae cb03afd
docs(browser): record ordinary shared teardown deadline
seonghobae 3430615
chore(stack): absorb corrected shared-teardown prerequisite
seonghobae 4da223a
chore(stack): absorb realigned forced-close prerequisite into shared …
seonghobae f42b388
Merge live PR #147 head into #150 stack
seonghobae File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
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
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
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
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
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,37 @@ | ||
| """Contract for one total post-shutdown teardown deadline in the ordinary Agent Task lane.""" | ||
|
|
||
| from __future__ import annotations | ||
|
|
||
| import pathlib | ||
| import unittest | ||
|
|
||
| ROOT = pathlib.Path(__file__).resolve().parents[1] | ||
| RUNNER = ROOT / "scripts" / "ci" / "run_mv3_compatibility.py" | ||
|
|
||
|
|
||
| class AgentTaskSharedTeardownDeadlineContractTests(unittest.TestCase): | ||
| """Prevent ordinary Agent Task teardown polling from multiplying the budget.""" | ||
|
|
||
| def test_browser_pass_uses_only_the_combined_teardown_waiter(self) -> None: | ||
| """Root and sampled-set evidence must share one timeout authority after shutdown.""" | ||
|
|
||
| runner = RUNNER.read_text(encoding="utf-8") | ||
| start = runner.index("def _run_agent_task_browser_pass(") | ||
| end = runner.index("\ndef _run_agent_task_trial(", start) | ||
| browser_pass = runner[start:end] | ||
|
|
||
| self.assertIn("_wait_for_linux_process_teardown(", browser_pass) | ||
| self.assertNotIn("_wait_for_linux_process_identity_exit(", browser_pass) | ||
| self.assertNotIn("_wait_for_linux_process_identity_set_exit(", browser_pass) | ||
|
|
||
| shutdown = browser_pass.index("_terminate_owned_process_bounded(") | ||
| teardown_wait = browser_pass.index("_wait_for_linux_process_teardown(") | ||
| failure_return = browser_pass.index( | ||
| "or driver_cleanup_failure_type is not None" | ||
| ) | ||
| self.assertLess(shutdown, teardown_wait) | ||
| self.assertLess(teardown_wait, failure_return) | ||
|
|
||
|
|
||
| if __name__ == "__main__": | ||
| unittest.main() |
Oops, something went wrong.
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.
Uh oh!
There was an error while loading. Please reload this page.