harmony-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Mikhail Loenko" <mloe...@gmail.com>
Subject Re: [classlib] [testing] 37% of total test execution time is spent in a single test
Date Thu, 01 Jun 2006 15:15:40 GMT
2006/6/1, Geir Magnusson Jr <geir@pobox.com>:
>
>
> 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: harmony-dev-unsubscribe@incubator.apache.org
> > For additional commands, e-mail: harmony-dev-help@incubator.apache.org
> >
> >
>
> ---------------------------------------------------------------------
> Terms of use : http://incubator.apache.org/harmony/mailing.html
> To unsubscribe, e-mail: harmony-dev-unsubscribe@incubator.apache.org
> For additional commands, e-mail: harmony-dev-help@incubator.apache.org
>
>

---------------------------------------------------------------------
Terms of use : http://incubator.apache.org/harmony/mailing.html
To unsubscribe, e-mail: harmony-dev-unsubscribe@incubator.apache.org
For additional commands, e-mail: harmony-dev-help@incubator.apache.org


Mime
View raw message