[docs] explainer for java packaging tests#30825
[docs] explainer for java packaging tests#30825andyb-elastic merged 3 commits intoelastic:masterfrom
Conversation
|
|
||
| ## Running these tests | ||
|
|
||
| See the section in [TESTING.asciidoc](../../TESTING.asciidoc#testing-packaging) |
There was a problem hiding this comment.
Maybe move that section into here and link from there to here?
| ## Adding a new test class | ||
|
|
||
| When gradle runs the packaging tests on a VM, it runs the full suite by | ||
| default. To add a test class to the suite, add its `class` to the |
There was a problem hiding this comment.
Does it run them in the order that they are declared? Maybe put that if it is true.
There was a problem hiding this comment.
It does, I'll add that
|
Jenkins run gradle build tests please |
Add note about suite test ordering
|
Pinging @elastic/es-core-infra |
rjernst
left a comment
There was a problem hiding this comment.
LGTM. I left a couple comments, most of which can be followups, especially since some will require refactoring the actual code.
|
|
||
| When gradle runs the packaging tests on a VM, it runs the full suite by | ||
| default. To add a test class to the suite, add its `class` to the | ||
| `@SuiteClasses` annotation in [PackagingTests.java](src/main/java/org/elasticsearch/packaging/PackagingTests.java). |
There was a problem hiding this comment.
I had not noticed this requirement before when reviewing. I think this will be very error prone, and we should change this in a followup. Randomized runner automatically finds the suites to invoke (iirc the ant runner is what finds the classes). I think we can do similar from gradle in generating the test shell script that invokes the test runner.
There was a problem hiding this comment.
Sounds good. I'm not sure if there's anything in junit 4 that does this out of the box but it shouldn't be too hard to get working
qa/vagrant/README.md
Outdated
| you can make an assumption using the constants and methods in [Platforms.java](src/main/java/org/elasticsearch/packaging/util/Platforms.java) | ||
|
|
||
| ```java | ||
| assumeThat("only run on windows", Platforms.WINDOWS, is(true)); |
There was a problem hiding this comment.
I would write this with assumeTrue, since the constant is already a boolean...
There was a problem hiding this comment.
👍 I'll do that in this PR since it's a small change
| Java alternative exists. For example most filesystem operations can be done with | ||
| the java.nio.file APIs. For those that aren't, use an instance of [Shell](src/main/java/org/elasticsearch/packaging/util/Shell.java) | ||
|
|
||
| Despite the name, commands run with this class are not run in a shell, and any |
There was a problem hiding this comment.
Is there any reason it couldn't be run in a shell? The Shell ctor could take the shell to run, ie bash or powershell? Otherwise I think we should rename Shell to Command or something similar, as it it would be too confusing.
There was a problem hiding this comment.
Yeah that makes sense. Running commands in bash is probably less likely to have weird issues, and we'll be wanting to run all the windows stuff in powershell anyway. I'll make a follow up for this
|
Jenkins run full packaging tests please |
|
Whoops, Jenkins run all packaging tests please |
* es/master: Move score script context from SearchScript to its own class (#30816) Fix bad version check writing Repository nodes (#30846) [docs] explainer for java packaging tests (#30825) Remove Throwable usage from transport modules (#30845) REST high-level client: add put ingest pipeline API (#30793) Update the version checks around ip_range bucket keys, now that the change was backported. Mute IndexMasterFailoverIT.testMasterFailoverDuringIndexingWithMappingChanges Use geohash cell instead of just a corner in geo_bounding_box (#30698) Limit user to single concurrent auth per realm (#30794) [Tests] Move templated _rank_eval tests (#30679) Security: fix dynamic mapping updates with aliases (#30787) Ensure that ip_range aggregations always return bucket keys. (#30701) Use remote client in TransportFieldCapsAction (#30838) Move Watcher versioning setting to meta field (#30832) [Docs] Explain incomplete dates in range queries (#30689) Move persistent task registrations to core (#30755) Decouple ClusterStateTaskListener & ClusterApplier (#30809) Send client headers from TransportClient (#30803) Packaging: Ensure upgrade_is_oss flag file is always deleted (#30732) Force stable file modes for built packages (#30823)
* 6.x: Fix double semicolon in import statement [TEST] Fix minor random bug from #30794 Enabling testing against an external cluster (#30885) SQL: Remove the last remaining server dependencies from jdbc (#30771) Add public key header/footer (#30877) Include size of snapshot in snapshot metadata (#29602) QA: Test template creation during rolling restart (#30850) REST high-level client: add put ingest pipeline API (#30793) Do not serialize basic license exp in x-pack info (#30848) [docs] explainer for java packaging tests (#30825) Verify signatures on official plugins (#30800) [DOCS] Document index name limitations (#30826) [Docs] Add reindex.remote.whitelist example (#30828)
Follow up from #30734