janhoy commented on code in PR #5369:
URL: https://github.com/apache/solr/pull/5369#discussion_r4692121227


##########
AGENTS.md:
##########
@@ -28,20 +28,17 @@ While README.md and CONTRIBUTING.md are mainly written for 
humans, this file is
 - See `dev-docs/gradle-help/tests.txt` for hints on running tests
 - To run a specific test: `gradlew :solr:core:test --tests 
"org.apache.solr.search.TestCaffeineCache"`
 - To run CATS (Cross-platform Automated Testing System), the cross-platform 
CLI suites: `gradlew -p solr/packaging catsTests --tests "*ZkTest"`
-- To run a specific BATS test (deprecated, replaced by CATS): `gradlew iTest 
--tests test_adminconsole_urls.bats`
 - The randomization seed is important.  To repeat a failing tests, pass the 
same seed given in the failure by adding to Gradle: 
`-Ptests.seed=HEXADECIMALHERE`.
 - Test output goes to 
`solr/<module>/build/test-results/test/outputs/OUTPUT-<fully.qualified.TestName>.txt`
 (stdout/stderr log) and 
`solr/<module>/build/test-results/test/TEST-<fully.qualified.TestName>.xml` 
(JUnit XML with pass/fail/error details)
 - To scan test output for a specific issue across already-run tests: `grep -rl 
"pattern" solr/*/build/test-results/test/outputs/`
 
 ## Writing Tests
 
-**Read `dev-docs/writing-tests.adoc` before writing any test.** It is the 
authority on which harness to use — `SolrTestCase` by default, 
`SolrCloudTestCase` only when a cluster is needed, `SolrCatsTestCase` for 
`bin/solr` and `bin\solr.cmd`, `AdminUiTestBase` for the browser, a 
Testcontainers `@ClassRule` for a real external service, and never 
`SolrTestCaseJ4`, a new `.bats` file, or `docker run` from a test — and on the 
lifecycle, randomization and waiting conventions, with a worked example per 
kind.
+**Read `dev-docs/writing-tests.adoc` before writing any test.** It is the 
authority on which harness to use — `SolrTestCase` by default, 
`SolrCloudTestCase` only when a cluster is needed, `SolrCatsTestCase` for 
`bin/solr` and `bin\solr.cmd`, `AdminUiTestBase` for the browser, a 
Testcontainers `@ClassRule` for a real external service, and never 
`SolrTestCaseJ4` or `docker run` from a test — and on the lifecycle, 
randomization and waiting conventions, with a worked example per kind.
 
 When adding a test to a suite that already exists, match the design choices of 
the file you are editing.
 
-- For BATS shell integration tests in `solr/packaging/test/`:
-    - Always use `run <command>` followed by `assert_output --partial "..."` 
or `refute_output --partial "..."` instead of capturing output into local 
variables and using `[[ ]]` comparisons
-    - Avoid patterns like `local var=$(cmd | grep ...); [[ "$var" == *"..."* 
]]` — use `run cmd` + `assert_output`/`refute_output` instead
+- Shell tests for `bin/solr`/`bin\solr.cmd` are CATS suites 
(`SolrCatsTestCase`); BATS was removed, don't add `.bats` files.

Review Comment:
   Yes, that's why I left some remnants of BATS wording a few places to make 
LLMs actively forget something about BATS they might have picked up earlier or 
find in an older checkout or a blog post.



-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]


---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to