RFR(M) : 8181761: add explicit @build actions for jdk.test.lib classes in all :tier2 tests

Alan Bateman Alan.Bateman at oracle.com
Thu Jun 8 10:36:03 UTC 2017


On 08/06/2017 11:11, Chris Hegarty wrote:
> :
> Just quickly looking at some of the networking test, e.g. JoinLeave:
>
>    * @bug 4091811 4148753 4102731
>    * @summary Test java.net.MulticastSocket joinGroup and leaveGroup
>    * @library /test/lib
> + * @build jdk.test.lib.NetworkConfiguration
> + *        jdk.test.lib.Utils
> + *        jdk.test.lib.Asserts
> + *        jdk.test.lib.JDKToolFinder
> + *        jdk.test.lib.JDKToolLauncher
> + *        jdk.test.lib.Platform
> + *        jdk.test.lib.process.*
>    * @run main JoinLeave
>    */
>
> I believe this test only requires jdk.test.lib.NetworkConfiguration. Is there any
> reason why the additional build targets are being added?
>
I was just looking at BasicMulticastTests and have the same question. It 
will confuse everyone that looks at or needs to change these tests. Also 
I suspect many people adding will (like me) grab the test description 
from a working test and use that as their starting point, just making 
this worse, esp. when new helpers are added to jdk.test.lib. I wouldn't 
object to jdk.test.lib.* but "@build jdk.test.lib.process.*" in tests 
that aren't launching new VMs is annoying.

Jon - is it time to write down some guidelines on how @library and 
@build should be used?

-Alan


More information about the core-libs-dev mailing list