2006/6/1, Geir Magnusson Jr <[EMAIL PROTECTED]>:


Mikhail Loenko wrote:
> There is a test
>
> tests.api.java.net.Inet6AddressTest.test_getByNameLjava_lang_String

Nice package name.  That's the first thing to be fixed :)

>
> that iterates over arrays of valid ip adresses (array.length = 11) and
> invalid ones (length=4). The test expects exception in invalid cases
> and some reasonable behavior in valid ones. The test takes more
> then 1/3 of the whole test suite execution time.
>
> Host resolution goes to a native code and seems to end inside OS
> (Windows in my case). As it was noticed in the "millions of rmi tests"
> thread it is not necessary to iterate through a huge set of possible values
> when a method just passes argument to a different method.
>
> I think that some of the values could be deleted from the array and
> replaced
> with duplicates of some existing entries (to exercise both positive and
> negative
> caching). I they could then we will reduce test execution time by ~30%
>
> Thoughts?

I don't quite grok what you mean - could you post what you are
suggesting in code here on -dev?


Index: modules/luni/src/test/java/tests/api/java/net/Inet6AddressTest.java
===================================================================
--- modules/luni/src/test/java/tests/api/java/net/Inet6AddressTest.java 
(revision
410480)
+++ modules/luni/src/test/java/tests/api/java/net/Inet6AddressTest.java (working
copy)
@@ -785,7 +785,7 @@
                                "FFFF:FFFF:FFFF:FFFF:FFFF:FFFF:255.255.255.255",
                                "0:0:0:0:0:0:0:0", "0:0:0:0:0:0:0.0.0.0" };

-               String invalidIPAddresses[] = { ":", "FFFF:FFFF", "1:1", 
"::1.2.3.444" };
+               String invalidIPAddresses[] = { "FFFF:FFFF" };

                for (int i = 0; i < validIPAddresses.length; i++) {





geir

>
> Thanks,
> Mikhail
>
> ---------------------------------------------------------------------
> Terms of use : http://incubator.apache.org/harmony/mailing.html
> To unsubscribe, e-mail: [EMAIL PROTECTED]
> For additional commands, e-mail: [EMAIL PROTECTED]
>
>

---------------------------------------------------------------------
Terms of use : http://incubator.apache.org/harmony/mailing.html
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



---------------------------------------------------------------------
Terms of use : http://incubator.apache.org/harmony/mailing.html
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to