Closed mikemccand closed 2 years ago
I'd reopen this to allow to make sure that Luke app and its launch scripts are not broken by any future changes.
A sanity check could be integrated into the nightly tests via the distribution tests.
luke.runmode
system property is set to "health", it would output some status message to the stdout, and immediately exit with exit code 0.:lucene:distribution.test
project[Legacy Jira: Tomoko Uchida (@mocobeta) on Dec 18 2021]
The launch script for Windows uses "javaw" to spawn the luke process; this makes it difficult to check the actual return code (%errorlevel%). I think we should change it to the plain "java" command.
[Legacy Jira: Tomoko Uchida (@mocobeta) on Dec 18 2021]
I think I can start this once https://github.com/apache/lucene/pull/533 is merged.
[Legacy Jira: Tomoko Uchida (@mocobeta) on Dec 18 2021]
Hi Tomoko. Let me add a scaffolding for such a test I already have elsewhere - maybe it'll be helpful as a starter.
[Legacy Jira: Dawid Weiss (@dweiss) on Dec 18 2021]
I added a rough sketch of a more realistic test for distribution scripts - https://github.com/apache/lucene/pull/550/files this actually runs Luke and simulates odd paths occasionally (with a space inside). I didn't check the Unix script but a change is required to pass arguments to Luke. The Windows script requires a subtle change too since we have to run integration tests with blocking/ exit code.
It's a draft, but should give you an idea of what this can look like.
[Legacy Jira: Dawid Weiss (@dweiss) on Dec 18 2021]
Thank you - the work seems almost complete.
I have unassigned myself here since I could break something by touching it. I have not run it yet, but I will do that sometime soon and let you know if I notice anything.
[Legacy Jira: Tomoko Uchida (@mocobeta) on Dec 19 2021]
Please do continue, Tomoko. I don't think it's complete - it's just showing how things can be done (and I know they work because it's the pattern I've been using elsewhere). Feel free to rearrange anything you want and copy over to your github - I'm swamped with trying to get those test framework/ modules working so I don't think I'll be returning to this soon and luke needs some love in terms of regression tests.
[Legacy Jira: Dawid Weiss (@dweiss) on Dec 19 2021]
I will try to take a look this week. I might need some time to get a full picture; please don't wait for me if my response is too slow.
[Legacy Jira: Tomoko Uchida (@mocobeta) on Dec 20 2021]
I wouldn't worry about the delay or time frame - it's not a job, it's a hobby. Ask me questions if you need anything explained.
[Legacy Jira: Dawid Weiss (@dweiss) on Dec 20 2021]
The patch works well for me (I ran it only on *nix machine). There would not be much I can do or want to do about it. Could you please merge it to the upstream when you have some time.
[Legacy Jira: Tomoko Uchida (@mocobeta) on Dec 22 2021]
I ran it on Windows and it works too. Ok, I'll merge it in. I thought you'd want to add some checks for the available factories, etc - like you already had in your previous patch. This can wait though - perhaps there is a better way to do it once I figure out how to run tests in module mode.
[Legacy Jira: Dawid Weiss (@dweiss) on Dec 22 2021]
Commit 72ba7ae2eed4e69ed5015b51ea9d69009bc82bd4 in lucene's branch refs/heads/main from Dawid Weiss https://gitbox.apache.org/repos/asf?p=lucene.git;h=72ba7ae
LUCENE-8930: script testing in the distribution (#550)
[Legacy Jira: ASF subversion and git services on Jan 19 2022]
Commit 5f1bcc6481bdad215ab9a7d644d2dac5f8efa9af in lucene's branch refs/heads/branch_9x from Dawid Weiss https://gitbox.apache.org/repos/asf?p=lucene.git;h=5f1bcc6
LUCENE-8930: script testing in the distribution (#550)
[Legacy Jira: ASF subversion and git services on Jan 20 2022]
Commit 08d6633d9454180ac936e5a17e3c9c95394c599a in lucene's branch refs/heads/main from Dawid Weiss https://gitbox.apache.org/repos/asf?p=lucene.git;h=08d6633
LUCENE-8930: increase timeout for the launched luke.
[Legacy Jira: ASF subversion and git services on Jan 20 2022]
Commit 77ee2a7c3cfbe72c59e4f9dee531fe07c8399ca2 in lucene's branch refs/heads/branch_9x from Dawid Weiss https://gitbox.apache.org/repos/asf?p=lucene.git;h=77ee2a7
LUCENE-8930: increase timeout for the launched luke.
[Legacy Jira: ASF subversion and git services on Jan 20 2022]
Commit fd817b6fb121723db6e9635a3ec9795ec0dd9a0d in lucene's branch refs/heads/main from Tomoko Uchida https://gitbox.apache.org/repos/asf?p=lucene.git;h=fd817b6
LUCENE-8930: increase timeout to 1 minite for the launched luke (seems it occationaly takes long time on windows vm)
[Legacy Jira: ASF subversion and git services on Jan 25 2022]
Commit bf6a035ca064905b2928426e9d44a45613d1fa30 in lucene's branch refs/heads/branch_9x from Tomoko Uchida https://gitbox.apache.org/repos/asf?p=lucene.git;h=bf6a035
LUCENE-8930: increase timeout to 1 minite for the launched luke (seems it occationaly takes long time on windows vm)
[Legacy Jira: ASF subversion and git services on Jan 25 2022]
I increased the timeout to 60 seconds but the forked process could possibly hang on the vm.
[Legacy Jira: Tomoko Uchida (@mocobeta) on Jan 25 2022]
Closing after the 9.1.0 release.
[Legacy Jira: Adrien Grand (@jpountz) on Mar 22 2022]
Would it be possible to add some release smoke tests for Luke?
https://stackoverflow.com/questions/79891/what-is-the-best-testing-tool-for-swing-based-applications
Legacy Jira details
LUCENE-8930 by Tomoko Uchida (@mocobeta) on Jul 22 2019, resolved Jan 20 2022