RFR: 7903519 : jtreg/jtharness is missing features for basic crash testing
Vladimir Sitnikov
vsitnikov at openjdk.org
Wed Dec 13 13:27:59 UTC 2023
On Wed, 13 Dec 2023 13:17:40 GMT, Jiří Vaněk <jvanek at openjdk.org> wrote:
>> src/com/sun/javatest/exec/ResultModifierInterface.java line 38:
>>
>>> 36: */
>>> 37: public interface ResultModifierInterface {
>>> 38: Status modifyStatus(Status originalStatus, TestDescription td);
>>
>> The interface name does not seem to be related with the method it has.
>>
>> a) If you want `ResultModifier` interface, then the method should probably be `void modify(TestResult result)` rather than passing "status and test description" separately
>> b) An alternative option could be `TestResultTransfomer extends Function<TestResult, TestResult>`
>
> IIRC, the `originalStatus` on input is necessary, because the original idea @andrlos had, that it was changing only failed tests.
> Otherwise I agree with your comments. ty!
The implementation can access the original status with `result.getStatus()`.
In other words, the framework should populate the result as usual with `result.setStatus(execStatus)`, and then it could call `resultModifier.modifyResult(result)`
-------------
PR Review Comment: https://git.openjdk.org/jtharness/pull/57#discussion_r1425350031
More information about the jtharness-dev
mailing list