Test for service iteration when SCE occurs
Paul Sandoz
paul.sandoz at oracle.com
Thu Aug 30 03:02:51 PDT 2012
On Aug 29, 2012, at 6:49 PM, Mandy Chung <mandy.chung at oracle.com> wrote:
> On 8/29/2012 9:11 AM, Paul Sandoz wrote:
>> Hi,
>>
>> http://cr.openjdk.java.net/~psandoz/jigsaw/iteration-error-test/webrev/jdk.patch
>>
>> Since the iteration of service instances from modules is separated out j.u.SL we need to ensure that behaviour is preserved when an SCE occurs.
>
> Paul - I think this test can use test/org/openjdk/jigsaw/tester.sh that will parse the given source and compile/install/run the main module. test/org/openjdk/jigsaw/hello.sh is a simple example. tester.sh currently doesn't allow blank lines though.
>
Thanks, i did not know about that.
I did some hacking (even modified tester.sh to support different separators) and tried to apply this to both iteration-error.sh and loader.sh but after a bit i stopped because it is proving extremely fragile.
That script does not process interfaces correctly, nor classes that implement or extend, nor interfaces/classes with generic type signatures. So i think we should update tester.sh separately to support alternative separators and be more robust processing classes/interface names, then update other tests as required.
--
I updated the webrev to include another service provider class that throws an exception to guarantee that iteration continues, as we currently make no guarantees on the order of iteration.
I also removed the unused type parameter from ServiceLoaderTest.
Paul.
More information about the jigsaw-dev
mailing list