-
Notifications
You must be signed in to change notification settings - Fork 768
Correct command to reproduce test with a failure in classMethod #2483
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
Conversation
if (result.resultType == TestResult.ResultType.FAILURE) { | ||
def testOrClassName = desc.name == "classMethod" ? desc.className : "${desc.className}.${desc.name}" | ||
failedTests << [ | ||
"name": "${desc.className}.${desc.name}", |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
How about also changing this?
"name": "${desc.className}.${desc.name}", | |
"name": "$testOrClassName", |
(I spotted this only because in https://github.com/apache/solr/actions/runs/9274510162/job/25517863554?pr=2483 it says "... ERROR: The following test(s) have failed: ... org.apache.solr.ltr.feature.TestUserTermScoreWithQ.classMethod (:solr:modules:ltr) ..." currently.)
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Hmm, its still probably good to have a pretty clear indication that it was a classMethod, right? I think it would be a bit confusing otherwise to see that both org.apache.solr.ltr.feature.TestUserTermScoreWithQ.testUserTermScoreWithQ
and org.apache.solr.ltr.feature.TestUserTermScoreWithQ
failed
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
It just happened so that in the GHA check (https://github.com/apache/solr/actions/runs/9274510162/job/25517863554) for this PR, a couple of tests failed - and one could see how the failures are reported:
- lines 479-478
> Task :solr:modules:ltr:test
org.apache.solr.ltr.feature.TestUserTermScoreWithQ > testUserTermScoreWithQ FAILED
java.lang.Exception: Test abandoned because suite timeout was reached.
at __randomizedtesting.SeedInfo.seed([1B9234167BEFFA61]:0)
org.apache.solr.ltr.feature.TestUserTermScoreWithQ > classMethod FAILED
java.lang.Exception: Suite timeout exceeded (>= 600000 msec).
at __randomizedtesting.SeedInfo.seed([1B9234167BEFFA61]:0)
- line 1017
2> NOTE: reproduce with: gradlew test --tests TestUserTermScoreWithQ.testUserTermScoreWithQ -Dtests.seed=1B9234167BEFFA61 -Dtests.locale=ar-BH -Dtests.timezone=WET -Dtests.asserts=true -Dtests.file.encoding=UTF-8
- line 1404
2> NOTE: reproduce with: gradlew test --tests TestUserTermScoreWithQ -Dtests.seed=1B9234167BEFFA61 -Dtests.locale=ar-BH -Dtests.timezone=WET -Dtests.asserts=true -Dtests.file.encoding=UTF-8
- lines 1413-1420
ERROR: The following test(s) have failed:
- org.apache.solr.ltr.feature.TestUserTermScoreWithQ.testUserTermScoreWithQ (:solr:modules:ltr)
Test output: /tmp/src/solr/solr/modules/ltr/build/test-results/test/outputs/OUTPUT-org.apache.solr.ltr.feature.TestUserTermScoreWithQ.txt
Reproduce with: gradlew :solr:modules:ltr:test --tests "org.apache.solr.ltr.feature.TestUserTermScoreWithQ.testUserTermScoreWithQ" -Ptests.jvms=96 "-Ptests.jvmargs=-XX:TieredStopAtLevel=1 -XX:+UseParallelGC -XX:ActiveProcessorCount=1 -XX:ReservedCodeCacheSize=120m" -Ptests.seed=1B9234167BEFFA61 -Ptests.timeoutSuite=600000! -Ptests.file.encoding=US-ASCII
- org.apache.solr.ltr.feature.TestUserTermScoreWithQ.classMethod (:solr:modules:ltr)
Test output: /tmp/src/solr/solr/modules/ltr/build/test-results/test/outputs/OUTPUT-org.apache.solr.ltr.feature.TestUserTermScoreWithQ.txt
Reproduce with: gradlew :solr:modules:ltr:test --tests "org.apache.solr.ltr.feature.TestUserTermScoreWithQ" -Ptests.jvms=96 "-Ptests.jvmargs=-XX:TieredStopAtLevel=1 -XX:+UseParallelGC -XX:ActiveProcessorCount=1 -XX:ReservedCodeCacheSize=120m" -Ptests.seed=1B9234167BEFFA61 -Ptests.timeoutSuite=600000! -Ptests.file.encoding=US-ASCII
Note that this PR only adjusts the line 1420 from the last block, - it now becomes consistent with line 1404 which already knew not to append "classMethod" to the class name.
if we are touching this lets add a |
Thanks @madrob - any particular reason why the patch from SOLR-15447 was never applied? |
Looks like this may be superseded by #2487 |
Yes I think this should be closed as incorporated by #2487 . Feel free to provide any further feedback there! |
Description
If a test fails due to some exception during static initialization, the logs contain message that looks like
which is not a valid command to re-run the test.
This PR changes the message to be
Checklist
Please review the following and check all that apply:
main
branch../gradlew check
.